List<PageInfo> subPages = new List<PageInfo>();
// ...
// some code to populate subPages here...
// ...
List<Guid> subPageGuids = new List<Guid> {from x in subPages select x.Id}; //doesn't work
PageInfo has an Id field which is of type Guid. So x.Id is a System.Guid.
2nd line of code above does not work...I get two errors:
The best overloaded Add method 'System.Collections.Generic.List.Add(System.Guid)' for the collection initializer has
some invalid argumentsArgument '1': cannot convert from 'System.Collections.Generic.IEnumerable' to 'System.Guid'
I've only been coding in C# for about a week, but I've done a similar pattern before and never had this problem.