Export (0) Print
Expand All

FileVersionInfo.PrivateBuild Property

Gets information about a private version of the file.

[Visual Basic]
Public ReadOnly Property PrivateBuild As String
[C#]
public string PrivateBuild {get;}
[C++]
public: __property String* get_PrivateBuild();
[JScript]
public function get PrivateBuild() : String;

Property Value

Information about a private version of the file.

Remarks

This information is present when IsPrivateBuild is true.

Example

The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Then it prints the private build information in a text box. This code assumes textBox1 has been instantiated.

[Visual Basic] 
Private Sub GetPrivateBuild()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo("%systemroot%\Notepad.exe")
    
    ' Print the private build number.
    textBox1.Text = "Private build number: " & myFileVersionInfo.PrivateBuild
End Sub 'GetPrivateBuild

[C#] 
private void GetPrivateBuild() {
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    // Print the private build number.
    textBox1.Text = "Private build number: " + myFileVersionInfo.PrivateBuild;
 }
    

[C++] 
private:
void GetPrivateBuild() {
    // Get the file version for the notepad.
    FileVersionInfo* myFileVersionInfo = FileVersionInfo::GetVersionInfo(S"%systemroot%\\Notepad.exe");
 
    // Print the private build number.
    textBox1->Text = String::Format( S"Private build number: {0}", myFileVersionInfo->PrivateBuild );
 }
    

[JScript] 
private function GetPrivateBuild() {
    //Get the file version for the notepad.
    var myFileVersionInfo : FileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    //Print the private build number.
    textBox1.Text = "Private build number: " + myFileVersionInfo.PrivateBuild;
 }
    

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

FileVersionInfo Class | FileVersionInfo Members | System.Diagnostics Namespace | IsPrivateBuild

Show:
© 2014 Microsoft