A group blog from members of the VB team
To learn more about Visual Studio 2010 and .NET Framework 4, Kathleen McGrath is highlighting new documentation about these products with a weekly blog post and a daily tweet. If you want to learn more about the new features and scenarios, check out her blog at http://blogs.msdn.com/kathleen and her twitter feed at http://twitter.com/kathleenmcgrath.
Mary Lee, Programming Writer.
Why don't we get the option to add Readonly and write only keywords to auto implemented properties?
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=457176
For WriteOnly properties we decided not to support this as they’re very rarely used (in fact the Framework Design Guidelines recommend avoiding them altogether), and since they’re only 5 lines the amount of typing it saves is not as significant as it is for regular properties.
For ReadOnly it’s potentially ambiguous what we should do when we see that modifier on an auto-property. Does it mean make a property with only a getter, and a non-readonly backing field? Or does it mean make property with only a getter and a *readonly* backing field?
We’re also thinking about things we can do to make writing immutable data structures easier in future releases of the language, so we want to keep the ReadOnly keyword available for auto-implemented properties. Right now a ReadOnly property only gives you “partial immutability” in that the object reference itself can’t be modified, but the objects that it references can be modified. Given that there’s more design work to be done and immutability would potentially be a much bigger feature, we decided to be conservative and keep our options open in the future. (Once we put something into the language it’s there forever :)
Hope that helps,
Jonathan
As a user I'm using Visual Studio 2010 version here and I want very much company specific training course gives VS 2010