4 ms·
I thought it was interesting that not only does this guy choose C# over Java but he chooses to write getter methods instead of properties https://github.com/jg
by pipeline_peak 4y ago
I thought it was interesting that not only does this guy choose C# over Java but he chooses to write getter methods instead of properties
https://github.com/jgosar/mine-city-2000/blob/master/SimCityReader/CityData.cs https://github.com/jgosar/mine-city-2000/blob/master/SimCity...
Completely trivial, but as a long time C# developer, this was a big pet peeve.
For City name just do
public string CityName{ get; private set; }
Based on the fact that I see capital letters in String etc, this is either old code or this guy dove head first from Java.
- chris37879 4y agoOr Unity, their flavor of C# discouraged properties for a long time, it does support them now, though.