why does explicit cast for generic list not work
问题 I am trying to cast a list of objects within a consturctor for a derive class IntersectionPath as follows. public class IntersectionPath : Path<IntersectionSegment>, IEnumerable { //Constructors public IntersectionPath() : base() { Verts = null; } public IntersectionPath(List<Intersection> inVerts, List<Segment<Node>> inEdges) : base() { this.Segments = (List<IntersectionSegment>) inEdges; } } Segments is defined in the generic base class Path public class Path<T> : IEnumerable<T> where T :