Is there a way to get the instance's class name with VB.NET?
Dim type As Type = yourObject.GetType() Dim typeName As String = type.FullName
Full name will get you the fully qualified name of the Type, including the namespace of the Type.
See MSDN for more information on what is available with Type
.
Try the following
Dim name = Me.GetType().Name
Or for any instance
Dim name = theObject.GetType().Name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With