can somebody tell me the difference between
public class Vendor
{
public string VendorName { get; set; }
}
and
public class Vendor
{
private string vendorName = string.Empty;
public string VendorName
{
get { return vendorName; }
set { vendorName = value; }
}
}
Is there any benefit of using a private variable? Doing so is only wastage of time and lines? There are no manipulations done to the property within the class.
Thanks