+ 1

The get set is confusing me somebody to help me out?

difference between {get;set;} and {get;private set;} in c#

10th May 2018, 8:12 PM
robert kiprotich
robert kiprotich - avatar
2 Answers
+ 1
{get; set;} is a normal read/write property. The user is allowed to read the property and to change it. {get; private set} is a read-only property The user is only allowed to read the property. The value of this property is set in code
10th May 2018, 8:47 PM
sneeze
sneeze - avatar
+ 1
thanks sneeze
10th May 2018, 8:56 PM
robert kiprotich
robert kiprotich - avatar