C#
// クラス名 string className = this.ToString(); // メソッド名 string MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
VB.NET
' クラス名 Dim className = Me.ToString ' メソッド名 Dim MethodName = System.Reflection.MethodBase.GetCurrentMethod().Name