Is there a way to get the instance's class name with VB.NET?
Is there a way to get the instance's class name with VB.NET?
Using Reflection, you could do the following...
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.ToString()
I use the following when logging trace info. This gives you the Class name, with all Namespaces and current Method name.
$"{System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.ToString()}.{MethodBase.GetCurrentMethod().Name}"