Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wish private was a suggestion and not strictly enforced in the same way that types aren't strictly enforced in C. Microsoft loves to make public variables private years during upgrades and it can be impossible to rewrite your application to avoid using that now-inaccessible variable. Looking at you, ASP.NET to .NET Core upgrade...



Have you heard of Unsafe Accessors? https://learn.microsoft.com/en-us/dotnet/api/system.runtime.... They help solve this problem.


Oh that's awesome that they added that. Ending up needing to access private members already sucks, but reflection makes it even worse due to the performance hit you take.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: