3 ms·
...and you never know when you might have to add something to the getter. It's the same reason why you usually prefer properties over public fields even if ther
by danbruc 13y ago
...and you never know when you might have to add something to the getter. It's the same reason why you usually prefer properties over public fields even if there is no logic in the accessors. Similarly you usually want to expose constants by wrapping them in a read-only property because otherwise the compiler will inline the constant and you can not change it without recompiling all dependencies.