Control.ProductName Property

Definition

Gets the product name of the assembly containing the control.

[System.ComponentModel.Browsable(false)]
public string ProductName { get; }

Property Value

The product name of the assembly containing the control.

Attributes

Examples

The following code example displays information about the application in a Label contained by a Form. This example requires that the CompanyName, ProductName and ProductVersion have been set.

private void AboutDialog_Load(object sender, EventArgs e)
{
   // Display the application information in the label.
   this.labelVersionInfo.Text = 
      this.CompanyName + "  " + 
      this.ProductName + "  Version: " +
      this.ProductVersion;  
}

Remarks

The ProductName property is a read-only property. To change the value of this property, set the Product property value of the AssemblyProductAttribute. The following line of C# code sets the ProductName property.

[assembly: AssemblyProduct("MyApplication")]

참고

It is strongly recommended that you provide the company name, product name, and product version. Providing this information enables the use of Windows Forms features such as Application.UserAppDataPath that make it easier to write applications that comply with the "Certified for Windows" program.

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