FileVersionInfo.ProductName Eigenschaft
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft den Namen des Produkts ab, mit dem diese Datei geliefert wird.
public:
property System::String ^ ProductName { System::String ^ get(); };
public string? ProductName { get; }
public string ProductName { get; }
member this.ProductName : string
Public ReadOnly Property ProductName As String
Eigenschaftswert
Der Name des Produkts, mit dem diese Datei verteilt wird, oder null
, wenn die Datei keine Versionsinformationen enthielt.
Beispiele
Im folgenden Beispiel wird GetVersionInfo aufgerufen, um die FileVersionInfo Editor abzurufen. Anschließend wird das ProductName Textfeld gedruckt. Dieser Code wird davon ausgegangen textBox1
, dass es instanziiert wurde.
private:
void GetProductName()
{
// Get the file version for the notepad.
FileVersionInfo^ myFileVersionInfo =
FileVersionInfo::GetVersionInfo( Environment::SystemDirectory + "\\Notepad.exe" );
// Print the product name.
textBox1->Text = String::Concat( "Product name: ", myFileVersionInfo->ProductName );
}
private void GetProductName()
{
// Get the file version for the notepad.
FileVersionInfo myFileVersionInfo =
FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");
// Print the product name.
textBox1.Text = "Product name: " + myFileVersionInfo.ProductName;
}
Private Sub GetProductName()
' Get the file version for the notepad.
Dim myFileVersionInfo As FileVersionInfo = _
FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
' Print the product name.
textBox1.Text = "Product name: " & myFileVersionInfo.ProductName
End Sub