List <T> from property in List <T>
I could not learn much about how to do this. I probably do not believe the terminology.
I have a list of objects:
class Cat() { public string Name { get; set; } } List<Cat> cats = new List<Cat>(); cats.add(new Cat() { Name = "Felix" } ); cats.add(new Cat() { Name = "Fluffy" } ); How to get a list of strings from the Name property so that it looks like this:
{ "Felix", "Fluffy" } +4
10 answers