指定されたファイルに適用される著作権表記を取得します。
Public ReadOnly Property LegalCopyright As String
[C#]
public string LegalCopyright {get;}
[C++]
public: __property String* get_LegalCopyright();
[JScript]
public function get LegalCopyright() : String;
プロパティ値
指定されたファイルに適用される著作権表記。
解説
これには著作権表記の全文、著作権や商標などを示す記号、著作権取得日などが含まれます。
使用例
GetVersionInfo を呼び出して、メモ帳の FileVersionInfo を取得する例を次に示します。次に、 LegalCopyright をテキスト ボックスに出力します。このコードは、 textBox1
がインスタンス化されていることを前提にしています。
Private Sub GetCopyright()
' Get the file version for the notepad.
Dim myFileVersionInfo As FileVersionInfo = _
FileVersionInfo.GetVersionInfo("%systemroot%\Notepad.exe")
' Print the copyright notice.
textBox1.Text = "Copyright notice: " & myFileVersionInfo.LegalCopyright
End Sub 'GetCopyright
[C#]
private void GetCopyright() {
// Get the file version for the notepad.
FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
// Print the copyright notice.
textBox1.Text = "Copyright notice: " + myFileVersionInfo.LegalCopyright;
}
[C++]
private:
void GetCopyright() {
// Get the file version for the notepad.
FileVersionInfo* myFileVersionInfo = FileVersionInfo::GetVersionInfo(S"%systemroot%\\Notepad.exe");
// Print the copyright notice.
textBox1->Text = String::Format( S"Copyright notice: {0}", myFileVersionInfo->LegalCopyright );
}
[JScript]
private function GetCopyright() {
//Get the file version for the notepad.
var myFileVersionInfo : FileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
//Print the copyright notice.
textBox1.Text = "Copyright notice: " + myFileVersionInfo.LegalCopyright;
}
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
FileVersionInfo クラス | FileVersionInfo メンバ | System.Diagnostics 名前空間