Gets the name of the file that this instance of FileVersionInfo describes.
[Visual Basic] Public ReadOnly Property FileName As String [C#] public string FileName {get;} [C++] public: __property String* get_FileName(); [JScript] public function get FileName() : String;
The name of the file described by this instance of FileVersionInfo.
The following example calls GetVersionInfo to get a FileVersionInfo for the Notepad. Then it prints the FileName in a text box. This code assumes TextBox1 has been instantiated.
[Visual Basic]
Private Sub GetFileName() Dim myFileVersionInfo As System.Winforms.FileVersionInfo myFileVersionInfo = System.Winforms.FileVersionInfo.GetVersionInfo("c:\WINNT\Notepad.exe") 'Print the file name and version number. TextBox1.Text = "File Name: " & myFileVersionInfo.FileName End Sub
FileVersionInfo Class | FileVersionInfo Members | System.WinForms Namespace