FileVersionInfo.FileDescription Egenskap
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Hämtar beskrivningen av filen.
public:
property System::String ^ FileDescription { System::String ^ get(); };
public string FileDescription { get; }
member this.FileDescription : string
Public ReadOnly Property FileDescription As String
Egenskapsvärde
Beskrivningen av filen eller null om filen inte innehåller versionsinformation.
Exempel
I följande exempel anropas GetVersionInfo för att hämta FileVersionInfo för Anteckningar. Sedan skrivs FileDescription den ut i en textruta. Den här koden förutsätter textBox1 att den har instansierats.
private void GetFileDescription()
{
// Get the file version for the notepad.
FileVersionInfo myFileVersionInfo =
FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");
// Print the file description.
textBox1.Text = "File description: " + myFileVersionInfo.FileDescription;
}
Private Sub GetFileDescription()
' Get the file version for the notepad.
Dim myFileVersionInfo As FileVersionInfo = _
FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
' Print the file description.
textBox1.Text = "File description: " & myFileVersionInfo.FileDescription
End Sub