I understand the diff. between both. and read the threads related to this. My question is regarding any performance gain. I used to create Properties with a local variable. and whenever i use the property INSIDE the class i use the local variable instead of property. I assumed there is a little gain in this rather than calling the property and then the property calling the local variable. In Automatic property its not possible. Is my assumption correct? does it have any gain (may be little) in my method?
sample
Public class class1
{
private int _someField;
public int SomeField
{
get{return _someField;}
set {_someField = value;}
}
Public void Insert()
{
str= "insert into table values(" + SomeField + ")
//or is it better to use like this?
str= "insert into table values(" + _someField + ")
}
}