This documentation is archived and is not being maintained.

FileVersionInfo.LegalCopyright Property

Gets all copyright notices that apply to the specified file.

Namespace: System.Diagnostics
Assembly: System (in system.dll)

public string LegalCopyright { get; }
/** @property */
public String get_LegalCopyright ()

public function get LegalCopyright () : String

Property Value

The copyright notices that apply to the specified file.

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

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.

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;
 }
    

private void GetCopyright()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo = 
        FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");

    // Print the copyright notice.
    textBox1.set_Text("Copyright notice: " 
        + myFileVersionInfo.get_LegalCopyright());
} //GetCopyright

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 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Show: