Hi All,
I am using code like this in Business Logic.Can u explain the below whether i am using Encapsulation concept in the below code.Also tell me why i should use private for declaring variable _Region and public for the property Region
I am using code like this in Business Logic.Can u explain the below whether i am using Encapsulation concept in the below code.Also tell me why i should use private for declaring variable _Region and public for the property Region
Code:
private string _Region;
public string Region
{
get{return _Region;}
set{_Region=value;}
}
Comment