Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I would have understood the reasoning if it said "private set", thus limiting the ways in which you're able to modify the score.
But this? This is just silly -
@ElectricCoffee
Probably be good to have a private variable too!
I just love the API of this class is Face.Increase(), Face.Decrease() & Face.Reset() -
@linux-colonel what would you need a private variable for this though? Having a private setter in the property should be enough
-
@ElectricCoffee
Ah, I'm not too familiar with c#. I assumed 'public static int score' was a public variable. -
@linux-colonel no, the {get; set} makes it an automatic property, i.e. a private variable with automatically generated getter and setter methods
You can make them explicitly private or protected by slotting in keywords between the brackets
Related Rants
Who wrote this??????Oh.... It's me
undefined
damn it's me
shitty code
obvious code