Sign in to follow this  
Daniel Miller

Simple C# syntax question

Recommended Posts

Axiverse    366

public int Foo
{
get {...}
internal set {...}
}


you can replace it with your own modifiers and it should work on the get as well.

Share this post


Link to post
Share on other sites
SamLowry    1865
Quote:
Original post by Daniel Miller
Thanks for the answer, for some reason I remember that not working a while ago. Maybe in C# 1.0? ++rating


Different visibility for the getter and setter is new in C# 2.0.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this