- Auto Implemented Properties
- Prop and propg
Following is the syntax to declare public accessor for the private field
For shortcut type “prop” and press tab twice.
For e.g. to declare employeeName field use the following shortcut.
public string EmployeeName { get; set; }
For readonly property type “propg” and hit tab twice.
public DateTime OrderDate { get; private set;}
No comments:
Post a Comment