Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Give an example for create the Properties get set function in c#.
Posted
Updated 4-Nov-11 21:04pm
v2
Comments
Prerak Patel 5-Nov-11 3:02am    
Elaborate more.

Bellow Code will help you.


C#
private string _Version;
public string Version
   {
     get { return _Version; }
     set { _Version = value; }
   }
 
Share this answer
 
v2
 
Share this answer
 
 
Share this answer
 
v2
 
Share this answer
 
C#
public int MyProperty
{ 
   get myProp;
   set myProp;
}


properties with example[^].

properties in C#.NET[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900