Sign in to follow this  
Followers 0
$phinX

[C#] How to get the Application's name

4 posts in this topic

How do i retrieve the application's name?

Isnt it something like App.ApplicationName or something? I cant remember and cant find it on the net!

Share this post


Link to post
Share on other sites

Product name of the 'EXE' (not! necessary the name of the 'EXE' file), as seen in Explorer's property window:

 Application.ProductName;

Name of the 'EXE' file:

 Path.GetFileName(Application.ExecutablePath);

Share this post


Link to post
Share on other sites

That needs the System.Windows.Forms namespace. Can it be done another way? Im trying to do this inside a class method... not on a windows form.

Share this post


Link to post
Share on other sites

System.AppDomain.CurrentDomain

or

System.Reflection.Assembly.GetExecutingAssembly()

These might help you with what you are trying to do :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.