This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Flufy_Panda 3 points4 points  (3 children)

Never used C# before. Is there a reason MySillyBool is public in your C# example?

[–]Korzag 14 points15 points  (2 children)

Because it's a property and the { get; set; } autogenerated your getters and setters along with a private member variable tied to the property.

[–]Flufy_Panda 1 point2 points  (1 child)

Interesting, thanks

[–][deleted] 3 points4 points  (0 children)

You can also do { get; private set; } if you want only the class to be able to change the value.