I did not see the C # standard on this, but most of the actual code that I saw uses the getter property to use, and they omit the word Get from the function name. Example:
Public SongOrderList SongOrder { get { return mySongOrderList; } }
Using "Get" (and "Set") as a function name prefix is what I usually see in langauges that don't have a la.NET properties (languages such as C, Java).
Edit:
... and of course you can have setters too
Public SongOrderList SongOrder { get { //do some processing code here return mySongOrderList; } set { //do some processing code here mySongOrderList = value; //value is a C
Of course, if you want to use getter and setter, and you do not need additional processing, just pure Java-bean-like get / set youc do this:
Public SongOrderList SongOrder { get; set; }
If you only need the HEAD getter, you can do it (I think it was time):
Public SongOrderList SongOrder { public get; private set; }
FrustratedWithFormsDesigner
source share