Skip to content

Instantly share code, notes, and snippets.

@jongillies
Created September 22, 2012 22:58
Show Gist options
  • 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