Table of Contents [Hide/Show]
Names File Names Versions and Other Info Other Debug Print Current Thread
System.Windows.Forms.Application.ProductName
using Microsoft.VisualBasic.ApplicationServices;using System.Reflection;AssemblyInfo info = new AssemblyInfo(Assembly.GetExecutingAssembly());string c2 = info.CompanyName;
Assembly.GetExecutingAssembly().FullName
using System.Diagnostics;StackFrame sf = new StackFrame(1);string result = sf.GetMethod().Module.Assembly.Location;
MethodInfo.GetCurrentMethod().DeclaringType.FullName
MethodInfo.GetCurrentMethod().Name
MethodInfo info = MethodInfo.GetCurrentMethod();System.Diagnostics.Debug.Print(info.DeclaringType.FullName + "." + info.Name);
using System.Diagnostics;StackFrame sf = new StackFrame(1);string result = sf.GetMethod().Name;
using System.Diagnostics;var mb = new StackTrace().GetFrame(1).GetMethod();var s = mb.ReflectedType.FullName + "." + mb.Name;
Microsoft.VisualBasic
Assembly.GetExecutingAssembly().Location
Application.ExecutablePath
System.Windows.Forms.Application.ProductVersion
Assembly.GetExecutingAssembly().GetName().Version.ToString()
using Microsoft.VisualBasic.ApplicationServices;using System.Reflection;AssemblyInfo info = new AssemblyInfo(Assembly.GetExecutingAssembly());// now use properties of the info variable
System.Diagnostics.Debug.Print( System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.FullName + "." + System.Reflection.MethodInfo.GetCurrentMethod().Name + " executing on Thread " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString());
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.