Freigeben über


Application.ProductName-Eigenschaft

Ruft den dieser Anwendung zugeordneten Produktnamen ab.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

Syntax

'Declaration
Public Shared ReadOnly Property ProductName As String
'Usage
Dim value As String

value = Application.ProductName
public static string ProductName { get; }
public:
static property String^ ProductName {
    String^ get ();
}
/** @property */
public static String get_ProductName ()
public static function get ProductName () : String

Eigenschaftenwert

Der Produktname.

Hinweise

ProductName wird aus den Metadaten der Assembly entnommen, die das Hauptformular der aktuellen Anwendung enthält. Er kann durch Festlegen des AssemblyProductAttribute innerhalb des Assemblymanifests festgelegt werden. Weitere Informationen finden Sie unter Assemblymanifest.

Beispiel

Im folgenden Codebeispiel wird diese Eigenschaft abgerufen und ihr Wert in einem Textfeld angezeigt. Dafür ist erforderlich, dass textBox1 in einem Formular platziert wurde.

Private Sub PrintProductName()
   textBox1.Text = "The product name is: " & _
      Application.ProductName
End Sub
private void PrintProductName() {
    textBox1.Text = "The product name is: " +
       Application.ProductName;
 }
private:
   void PrintProductName()
   {
      textBox1->Text = "The product name is: {0}",
         Application::ProductName;
   }
private void PrintProductName()
{
    textBox1.set_Text("The product name is: "
        + Application.get_ProductName());
} //PrintProductName

Plattformen

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

Application-Klasse
Application-Member
System.Windows.Forms-Namespace
ProductVersion
Application.CompanyName-Eigenschaft
AssemblyProductAttribute