Re:Data Classes for Java
by michaelgrosner2 on Wednesday November 01, 2017 @10:36PM
(#15607405)
In C# 6, using properties is actually slightly less verbose, "public int Foo { get; }" vs "public readonly int Foo;". Also, you can easily slap an interface around your data class if you need to later. So my thinking has switched when writing new C# -- why not use a property?
[ Parent
| on HN ]
There are no comments on this comment yet.