This documentation is archived and is not being maintained.

FileVersionInfo.LegalCopyright Property

Gets all copyright notices that apply to the specified file.

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

Property Value

The copyright notices that apply to the specified file.

Remarks

This should include the full text of all notices, legal symbols, copyright dates, and so on.

Example

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

[Visual Basic] 
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;
 }
    

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

Show: