Application.ProductName Property

Definition

Gets the product name associated with this application.

public static string ProductName { get; }
public static string? ProductName { get; }

Property Value

The product name.

Examples

The following code example gets this property and displays its value in a text box. The example requires that textBox1 has been placed on a form.

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

Remarks

ProductName is taken from the metadata of the assembly containing the main form of the current application. You can set it by setting AssemblyProductAttribute inside of your assembly manifest. For more information, see Assembly Manifest.

Applies to

Продукт Версії
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also