S
Simon Woods
Hi (final q I hope!)
I have a class which implements an
Public Class MyClass(Of T)
Implements IMyInterface
End Class
The Class was instantiated with a
Dim _myClass as New MyClass(of String)
and then added to a Dictionary(of String, IMyInterface)
When I enumerate the dictionary
For each _kvp as KeyPairValue(of String, IMyInterface)
Dim _myClass = _kvp.value
I look at Intellisense and it tells me that _kvp.Value is a MyClass(of
String), yet when it is assigned to _myClass it is still a IMyInterface.
Is there anyway I can get it to cast to what Intellisense is telling me
it's underlying type is without explicitly
dim _myClass = CType(_kvp.value,MyClass(of String))
Thx
Simon
I have a class which implements an
Public Class MyClass(Of T)
Implements IMyInterface
End Class
The Class was instantiated with a
Dim _myClass as New MyClass(of String)
and then added to a Dictionary(of String, IMyInterface)
When I enumerate the dictionary
For each _kvp as KeyPairValue(of String, IMyInterface)
Dim _myClass = _kvp.value
I look at Intellisense and it tells me that _kvp.Value is a MyClass(of
String), yet when it is assigned to _myClass it is still a IMyInterface.
Is there anyway I can get it to cast to what Intellisense is telling me
it's underlying type is without explicitly
dim _myClass = CType(_kvp.value,MyClass(of String))
Thx
Simon