Why do you expect you can quit? The object is not an instance of CategoryObjCollection . Points of a reference type (when they actually call, rather than cause explicit conversions) should tell the compiler that, in your opinion, the runtime type of the object is actually compatible with the type you specify so that you can use members of this particular type (after the runtime test ) In this case, the ToList extension ToList simply creates a new List<T> .
To what extent is your CategoryObjCollection type designed to achieve in the first place? If it has any state other than a normal list, where do you expect this state to occur after a LINQ query? If it does not have any other state, does it really add any benefits? Maybe your type should contain a list, and not flow from it? Then you can create a new instance of the type using the query results.
In general, this is usually the smell of design coming from List<T> . It does not provide many ways to specialize in "its unusualness" (unlike, say, Collection<T> ). This is usually a sign that you should think about composition instead of inheritance.
Jon skeet
source share