Skip to content

Instantly share code, notes, and snippets.

@jongillies
Created September 22, 2012 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jongillies/3768147 to your computer and use it in GitHub Desktop.
Save jongillies/3768147 to your computer and use it in GitHub Desktop.
Find out your process filename in C#
namespace Supercoder.Tools
{
public class ProcessInfo
{
public static string MyName()
{
return(System.IO.Path.GetFileName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment