I have an open class Profile. A very simple model class currently with 2 properties; string Nameand string Fields. As the project develops, the class will expand, but this is not particularly important at the moment.
I have a Global static IListtype Profilecalled Profiles. I am new to data manipulation in these types IEnumerable, but I want to update one of the properties of one profile. I tried the following, but I get a reference to an object not throwing an exception. Below I set the property:
Profiles.Single(x => x.Name == listBoxProfiles.Text).Fields = textBoxFieldName.Text;
The debugger shows that the properties of the list text and text field have the correct values, so I think this is how I use a single that is incorrect.
If anyone could shed light, I would be grateful.
source
share