Application.CompanyName 屬性

定義

取得與應用程式關聯的公司名稱。

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

屬性值

String

公司名稱。

範例

下列程式碼範例會取得這個屬性,並在文字方塊中顯示其值。 此範例要求 textBox1 已放在表單上。

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

適用於

另請參閱