FileVersionInfo.IsPrivateBuild プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ファイルが標準リリース プロシージャを使用してビルドされたかどうかを示す値を取得します。
public:
property bool IsPrivateBuild { bool get(); };
public bool IsPrivateBuild { get; }
member this.IsPrivateBuild : bool
Public ReadOnly Property IsPrivateBuild As Boolean
プロパティ値
true ファイルがプライベート ビルドの場合。 false ファイルが標準リリース手順を使用してビルドされた場合、またはファイルにバージョン情報が含まれていない場合に使用します。
例
次の例では、 GetVersionInfo を呼び出してメモ帳の FileVersionInfo を取得します。 次に、プライベート ビルド情報がテキスト ボックスに表示されます。 このコードでは、 textBox1 がインスタンス化されていることを前提としています。
private void GetIsPrivateBuild()
{
// Get the file version for the notepad.
FileVersionInfo myFileVersionInfo =
FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");
// Print whether the version is a private build.
textBox1.Text = "Version is a private build: " + myFileVersionInfo.IsPrivateBuild;
}
Private Sub GetIsPrivateBuild()
' Get the file version for the notepad.
Dim myFileVersionInfo As FileVersionInfo = _
FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
' Print whether the version is a private build.
textBox1.Text = "Version is a private build: " & myFileVersionInfo.IsPrivateBuild
End Sub
注釈
この値が trueの場合、 PrivateBuild は、このバージョンのファイルと標準バージョンの違いについて説明します。