Select Case on an object’s type in VB.NET
With VB 2010, for projects targeting .NET framework 4 and later, you can now do this: Select Case msg.GetType() Case GetType(ClassA) End Select In earlier VB versions, it didn’t work because you couldn’t compare two types with equality. You’d have to check if they point to the same reference using the Is keyword. It’s not … Read more