Get Executable exe name of .Net application

This function is return exe name of .net application.


public string getExecutableName()
{
string Strpath = null;
int i= Application.ExecutablePath.LastIndexOf("\\");
string[] spltStr = null;
Strpath = Application.ExecutablePath.Substring(i);
char strchar = Convert.ToChar(@"\");
spltStrpath = lioString.Split(strchar );
return spltStrpath[1];
}


Comments

Author: chetan kulkarni21 Dec 2009 Member Level: Bronze   Points : 0

its working

Author: Dilip18 Jan 2010 Member Level: Gold   Points : 1

Hello
Nice piece of code
Thanks for sharing your knowledge with us.
I hope to see more good code from your side
This code will help lots of guys



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: