Relative Content

Tag Archive for c#.netdictionaryinheritancepolymorphism

Implicit casting / polymorphism with a Dictionary in C#

I’ve got a problem where I am not able to implicitly cast a Dictionairy<int, class> to a Dictionairy<int, interfaceOfClass> where I feel that this should normally be possible with the rules of polymorphism. The workaround I currently have is to do an explicit cast like this class => class as interfaceOfClass.

Implicit casting / polymorphism with a Dictionary in C#

I’ve got a problem where I am not able to implicitly cast a Dictionairy<int, class> to a Dictionairy<int, interfaceOfClass> where I feel that this should normally be possible with the rules of polymorphism. The workaround I currently have is to do an explicit cast like this class => class as interfaceOfClass.

Implicit casting / polymorphism with a Dictionary in C#

I’ve got a problem where I am not able to implicitly cast a Dictionairy<int, class> to a Dictionairy<int, interfaceOfClass> where I feel that this should normally be possible with the rules of polymorphism. The workaround I currently have is to do an explicit cast like this class => class as interfaceOfClass.

Implicit casting / polymorphism with a Dictionary in C#

I’ve got a problem where I am not able to implicitly cast a Dictionairy<int, class> to a Dictionairy<int, interfaceOfClass> where I feel that this should normally be possible with the rules of polymorphism. The workaround I currently have is to do an explicit cast like this class => class as interfaceOfClass.

Implicit casting / polymorphism with a Dictionary in C#

I’ve got a problem where I am not able to implicitly cast a Dictionairy<int, class> to a Dictionairy<int, interfaceOfClass> where I feel that this should normally be possible with the rules of polymorphism. The workaround I currently have is to do an explicit cast like this class => class as interfaceOfClass.