Here’s the problem
I’m trying to cast form List to an object MyTypes which is defined as
public class MyTypes : List<MyType> { ... }
It won’t cast directly with (MyTypes) – compiler error
Or with as MyTypes – returns null
I would think this would be possible, but clearly I have to overload some casting operation.
Help!
You could pass your
List<MyType>in as a parameter when constructing yourMyTypesand then hand this off to the base class constructor..