[Mono-list] Downcasting using generics in Mono-2.8.2
Sean Hubbell
Sean.Hubbell at gdc4s.com
Tue Feb 15 12:52:27 EST 2011
Hello,
I have cross compiled mono and mod_mono to run on an arm processor. I am
running into the following issue:
I create a generic object and add it to a collection like so:
collection.Add(new ConfigurableItem<string, int>("MyKey", 10));
When I retrieve the item out of the collection, I access it via an interface
called IConfigurableItem.
I then try to downcast this like so:
IConfigurableItem item = collection.Retrieve("MyKey");
ConfigurableItem<string, int> myItem = item as ConfigurableItem<string,
int>;
myItem is null so I looked into more detail at the type info which is
reporting:
ConfigurableItem`2[System.String,System.String]
Does anyone else see this issue? Is there a patch for this?
--
View this message in context: http://mono.1490590.n4.nabble.com/Downcasting-using-generics-in-Mono-2-8-2-tp3307252p3307252.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list