O'Reilly logo

Windows Forms Programming in C# by Chris Sells

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Environment

During its lifetime, an application runs in a certain environment. The environment is provided by a combination of compile-time and run-time settings supplied by .NET and Windows.

Compile-Time Settings

The Application class exposes several properties that provide the company name, product name, and product version of the currently running application:

void AboutBox_Load(object sender, EventArgs e) {
  this.companyNameTextBox.Text = Application.CompanyName;
  this.productNameTextBox.Text = Application.ProductName;
  this.productVersionTextBox.Text = Application.ProductVersion;
}

By default, these three values come from assemblywide AssemblyCompanyAttribute, AssemblyProductAttribute, and AssemblyVersionAttribute (provided in a wizard-generated ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required