Product | System.Windows.Forms.Application.ProductName |
Company1 | using Microsoft.VisualBasic.ApplicationServices; using System.Reflection; AssemblyInfo info = new AssemblyInfo(Assembly.GetExecutingAssembly()); string c2 = info.CompanyName; |
Current Assembly | Assembly.GetExecutingAssembly().FullName |
Calling Assembly | using System.Diagnostics; StackFrame sf = new StackFrame(1); string result = sf.GetMethod().Module.Assembly.Location; |
Current Namespace and Class | MethodInfo.GetCurrentMethod().DeclaringType.FullName |
Current Method | MethodInfo.GetCurrentMethod().Name |
Current Method, Fully Qualified | MethodInfo info = MethodInfo.GetCurrentMethod(); System.Diagnostics.Debug.Print(info.DeclaringType.FullName + "." + info.Name); |
Calling Method | using System.Diagnostics; StackFrame sf = new StackFrame(1); string result = sf.GetMethod().Name; |
Calling Method, Fully Qualified | using System.Diagnostics; var mb = new StackTrace().GetFrame(1).GetMethod(); var s = mb.ReflectedType.FullName + "." + mb.Name; |