SyntaxFix
Write A Post
Hire A Developer
Questions
well here is common usage of getter setter in actual use case,
public class OrderItem { public int Id {get;set;} public int quantity {get;set;} public int Price {get;set;} public int TotalAmount {get {return this.quantity *this.Price;}set;} }