Sunday, August 25, 2013

Return list of readonly objects with readonly fields in property

Make the set for Number be private (you don't need the backing field, use an auto property)


public int Number {get; private set;}


(Change the constructor to access this property, of course)




Paul Linton


No comments:

Post a Comment