Control.ProductName 속성

정의

컨트롤이 포함된 어셈블리의 제품 이름을 가져옵니다.

public:
 property System::String ^ ProductName { System::String ^ get(); };
[System.ComponentModel.Browsable(false)]
public string ProductName { get; }
[<System.ComponentModel.Browsable(false)>]
member this.ProductName : string
Public ReadOnly Property ProductName As String

속성 값

String

컨트롤이 포함된 어셈블리의 제품 이름입니다.

특성

예제

애플리케이션에 대 한 정보를 표시 하는 다음 코드 예제는 Label 에 포함 된를 Form입니다. This example requires that the CompanyName, ProductName and ProductVersion have been set.

void AboutDialog_Load( Object^ /*sender*/, EventArgs^ /*e*/ )
{
   // Display the application information in the label.
   this->labelVersionInfo->Text = String::Format(  "{0} {1} Version: {2}", this->CompanyName, this->ProductName, this->ProductVersion );
}
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;  
}
Private Sub AboutDialog_Load(sender As Object, e As EventArgs) Handles MyBase.Load
   ' Display the application information in the label.
   Me.labelVersionInfo.Text = _
      Me.CompanyName + "  " + _
      Me.ProductName + "  Version: " + _
      Me.ProductVersion
   End Sub

설명

ProductName 속성은 읽기 전용 속성입니다. 이 속성의 값을 변경하려면 .의 AssemblyProductAttribute속성 값을 설정합니다Product. 다음 C# 코드 줄은 속성을 설정합니다 ProductName .

[assembly: AssemblyProduct("MyApplication")]  

참고

회사 이름, 제품 이름 및 제품 버전을 제공하는 것이 좋습니다. 이 정보를 제공 합니다. 사용할 수 있도록 Windows Forms 기능 같은 Application.UserAppDataPath "Windows 인증" 프로그램을 준수 하는 애플리케이션을 작성할 쉽게 만들어 주는 합니다.

적용 대상

추가 정보