Control.CompanyName Property

Definition

Gets the name of the company or creator of the application containing the control.

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

Property Value

The company name or creator of the application 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 CompanyName property is a read-only property. To change the value of this property, set the Company property value of the AssemblyCompanyAttribute. The following line of C# code sets the CompanyName property.

[assembly: AssemblyCompany("Microsoft")]

Note

It is strongly recommended that you provide the company name, product name, and product version for your app.

Applies to

Product Versions
.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