Application.ProductName

  • Thread starter Thread starter A.M
  • Start date Start date
A

A.M

Hi,

In vb.bet we have Application object that gives us information about
application name and path (like Application.ProductName). How can i have
Application object functionality in C# ?

Thanks,
Ali
 
Ali,

The ProductName property is a member of the Application class, which is
in the System.Windows.Forms namespace. It is accessible to C# in the same
way that it is accessible to VB. As a matter of fact, if you look at the
template for any Windows Forms application project, you will notice that the
Main method has a call to Application.Run, which is the same Application
type used in VB.

Hope this helps.
 
Hi,

Thanks for posting in this group.
Based on my understanding, you want to get the Application object
functionality in C#.
Actually, the Application object are the type of
System.Windows.Forms.Application class, which is a class of .Net Class
Library. It is not the feature of VB.net, it is common to all .Net
language, so you can use it freely in C#.
If you look up in MSDN, you will find that all the members of Application
class are static field, so you can use it freely without construct an
instance of Application class.

If you still have anything unclear, please feel free to tell me.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top