Returns a partial list of properties in the FileVersionInfo and their values.
[Visual Basic] Overrides Public Function ToString() As String [C#] public override string ToString(); [C++] public: override String* ToString(); [JScript] public override function ToString() : String;
A list of the following properties in this class and their values:
FileName, InternalName, OriginalFilename, FileVersion, FileDescription, ProductName, ProductVersion, IsDebug, IsPatched, IsPreRelease, IsPrivateBuild, IsSpecialBuild.
If no file with the specified name i found, this list will contain only the name of the requested file. Boolean values will be false, and all other entries will be a null reference (in Visual Basic Nothing).
The following example calls GetVersionInfo to get a FileVersionInfo for the Notepad. Then it calls ToString to print a list of the file version information in a text box. This code assumes TextBox1 has been instantiated.
[Visual Basic]
Private Sub GetFileVersion2() Dim myFileVersionInfo As System.Winforms.FileVersionInfo myFileVersionInfo = System.Winforms.FileVersionInfo.GetVersionInfo("c:\WINNT\Notepad.exe") 'Print the all the version information. TextBox1.Text = myFileVersionInfo.ToString End Sub
FileVersionInfo Class | FileVersionInfo Members | System.WinForms Namespace | FileName | InternalName | OriginalFilename | FileVersion | FileDescription | ProductName | ProductVersion | IsDebug | IsPatched | IsPreRelease | IsPrivateBuild | IsSpecialBuild