Z
zino
how can I get the class type from an interface supposing that the class
implement this interface as below:
Public Interface myInterface
'... ... some methods
End Interface
public class myclass
Implements myInterface
'... ... some methods
end class
function myFunction
dim myInt As myInterface = New myclass
dim t As Type = myInt.GetType
' I need something that is equivalent to this statement (trying to get
"myclass"
' type) from the interface. Is there a way to get "myClass" type, from
t ?
'dim myList As New List(Of myclass)
' but this does not compile
dim myList as new List(of t)
end function
implement this interface as below:
Public Interface myInterface
'... ... some methods
End Interface
public class myclass
Implements myInterface
'... ... some methods
end class
function myFunction
dim myInt As myInterface = New myclass
dim t As Type = myInt.GetType
' I need something that is equivalent to this statement (trying to get
"myclass"
' type) from the interface. Is there a way to get "myClass" type, from
t ?
'dim myList As New List(Of myclass)
' but this does not compile
dim myList as new List(of t)
end function