[Mono-list] bug casting to a List<T>

Daniel Soto daniel.soto2k at gmail.com
Sat Sep 29 01:12:24 EDT 2007

Hi All.

When i try to cast to a Generic.List<T> from object type, i get the 

System.InvalidCastException: Cannot cast from source type to destination type.

The code that throws the exception, here

System.Collections.Generic.List<MyClass> myList;
myList = (System.Collections.Generic.List<MyClass>)Session["ListInMemory"];

The same occurs if i try to cast to ArrayList, or an Array of object.

This is a bug? In the bug list in the main page of mono, it says that it's resolved, 
but to me still doest not work :-(

Either i can to report this bug, my novell account says that my access 
is forbidden (huh? but i finish creating it!!).

There are another way to passing the values from object to my List?

Best regards.

More information about the Mono-list mailing list