So you have a column in the DB called
codes which is actually comma-delineated values
You have a generic
get...set
for this public property.
The code you have presented references a property/field called
_codes
Normally an underscore represents a private
field and is intuitively named by the property which refers to it, something like this
private string _codes { get; set; }
public string codes { get { return _codes; } set { _codes = value; } }
Now what it looks like is that you want those
codes to come back as a series of values. And you want those values trimmed of any white-space.
You can try working off of this block of code to bring that value back as an array
public string[] codes_format
{
get
{
return (Array.ConvertAll(_codes.Split(','), p => p.Trim()));
}
}