Application.CompanyName 属性

定义

获取与该应用程序关联的公司名称。Gets the company name associated with the application.

public:
 static property System::String ^ CompanyName { System::String ^ get(); };
public static string CompanyName { get; }
member this.CompanyName : string
Public Shared ReadOnly Property CompanyName As String

属性值

公司名称。The company name.

示例

下面的代码示例获取此属性,并在文本框中显示其值。The following code example gets this property and displays its value in a text box. 该示例要求将 textBox1 放置在窗体上。The example requires that textBox1 has been placed on a form.

private:
   void PrintCompanyName()
   {
      textBox1->Text = String::Format( "The company name is: {0}",
         Application::CompanyName );
   }
private void PrintCompanyName()
{
    textBox1.Text = "The company name is: " + Application.CompanyName;
}

Private Sub PrintCompanyName()
   textBox1.Text = "The company name is: " & _
      Application.CompanyName
End Sub
  

适用于

另请参阅