In C # languages and its cousins we always use
public string SomeString { get; set;}
But you can also use (I found this only recently and while cheating with the compiler)
public string SomeString { set; get; }
I have no formal training in programming, and all are conceivable. I used { get; set; }without any thoughts like us. 1 + 1 = 2Is order { get; set; }just a convention, or is it necessary to maintain that order, or is it some kind of remnant of a past era of history C, similar to how we define an ordinary electric current flowing from a positive to a negative terminal when it is actually the other way around?
source
share