In my class I have private variables and properties like this.
private string _itemCOde=string.Empty;
private string _itemName=string.Empty;
public string
You can dynamically associate names and values with each other using a Dictionary
public string this[this key]
{
get { return dictionary[key]; }
set { dictionary[key] = value == null ? null : value.Trim(); }
}
Still, if the database changes, then you really should probably change your object because it changed.