How do I determine if a value is an instance of a generic type, ignoring the type parameter, in vb.n
Posted
by Strilanc
on Stack Overflow
See other posts from Stack Overflow
or by Strilanc
Published on 2010-03-27T00:21:40Z
Indexed on
2010/03/27
0:23 UTC
Read the original article
Hit count: 705
I have a class C(Of T). I want to determine if some given value has type C, regardless of what T is. For example, I might want to determine if a value is a strongly-typed list, regardless what type of items the list stores.
I just need to know how to do it in VB.net. In C# the syntax is like this:
var result = obj instanceof Gen2<?>;
© Stack Overflow or respective owner