Convert List< Guid > to List< Guid? >

c#, casting, linq

Solution

Something like this

return guids.Select(e => new Guid?(e)).ToList();

Problem

What is the best practice to convert List< Guid > to List< Guid? > The following does not compile: ``` public List<Guid?> foo() { List<Guid> guids = getGuidsList(); return guids; } ```

Original source