Export (0) Print
Expand All

Application.ProductName Property

Gets the product name associated with this application.

[Visual Basic]
Public Shared ReadOnly Property ProductName As String
[C#]
public static string ProductName {get;}
[C++]
public: __property static String* get_ProductName();
[JScript]
public static function get ProductName() : String;

Property Value

The product name.

Example

[Visual Basic, C#, C++] The following example gets this property and displays its value in a text box. The example assumes that textBox1 has been placed on a form.

[Visual Basic] 
Private Sub PrintProductName()
   textBox1.Text = "The product name is: " & _
      Application.ProductName
End Sub


[C#] 
private void PrintProductName() {
    textBox1.Text = "The product name is: " +
       Application.ProductName;
 }


[C++] 
private:
   void PrintProductName() {
      textBox1->Text = S"The product name is: {0}", Application::ProductName;
   }

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Application Class | Application Members | System.Windows.Forms Namespace | ProductVersion | CompanyName | AssemblyProductAttribute

Show:
© 2014 Microsoft