Andy Smith's Blog

Page.RegisterStartupScript('Andy', 'MetaBuilders_WebControls_GainKnowledge();');

a change to c# that I wasn't aware of

Now that msdn has an rss feed i was just kinda looking at it and I saw a chat transcript on c# that I hadn't noticed before.

The only bit that I hadn't heard before is this little snippet.

Host: Anders (Microsoft)
Q: Will separate access specifiers for getting and setting properties become a part of the language?

A: Regarding different accessibility of get and set assessors of a property, yes, we will support that in the Whidbey release of C#.

I have no idea how they are going to do this without drasticly changing how properties are written, but hey, it sounds good to me.

Comments

Paul Wilson said:

IL actually already supports this! Properties in IL are just a "note" to higher-level tools to treat related, but separate, get and set methods as one. You can see this in both ILDASM and Anakrino if you need to prove it to yourself.
# April 1, 2003 2:38 PM

Dunc said:

Just guessing:

public string MyProperty
{
get {
return _myProperty;
}
private set {
_myProperty = value;
}
}
# April 9, 2003 9:58 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)