S
shapper
Hello,
I created a list: List<Theme> Themes.
Each theme has 3 properties: Guid Id, String Title, String Type
I need to remove and item from the list given its id:
Theme theme = MyThemes.Where(t => t.Id == _Id).SingleOrDefault
();
if (theme != null)
MyThemes.Remove(theme);
Is this the way to do this?
I am not sure if I should use something like IndexOf, etc ...
Thanks,
Miguel
I created a list: List<Theme> Themes.
Each theme has 3 properties: Guid Id, String Title, String Type
I need to remove and item from the list given its id:
Theme theme = MyThemes.Where(t => t.Id == _Id).SingleOrDefault
();
if (theme != null)
MyThemes.Remove(theme);
Is this the way to do this?
I am not sure if I should use something like IndexOf, etc ...
Thanks,
Miguel