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