I have a collection of objects representing a folder structure.
I'd like to set the property FileExtension
to null, if it's a folder.
This is as far as I've got. Can anyone help?
var items = MyClass.All().ToList();
items.ForEach(x => x.FileExtension = string.empty)
.Where(y => y.FileExtension == "folder")
.ToList();