共用方式為


FileVersionInfo.LegalCopyright 屬性

定義

取得所有套用至指定檔案的著作權注意事項。

public:
 property System::String ^ LegalCopyright { System::String ^ get(); };
public string? LegalCopyright { get; }
public string LegalCopyright { get; }
member this.LegalCopyright : string
Public ReadOnly Property LegalCopyright As String

屬性值

套用至指定檔案的著作權注意事項。

範例

下列範例會呼叫 GetVersionInfo 以取得 FileVersionInfo [記事本] 的 。 然後它會在文字框中列印 LegalCopyright 。 此程式代碼假設 textBox1 已具現化。

private:
    void GetCopyright()
    {
        // Get the file version for the notepad.
        FileVersionInfo^ myFileVersionInfo =
            FileVersionInfo::GetVersionInfo( Environment::SystemDirectory + "\\Notepad.exe" );

        // Print the copyright notice.
        textBox1->Text = String::Concat( "Copyright notice: ", myFileVersionInfo->LegalCopyright );
    }
private void GetCopyright()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo =
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");

    // Print the copyright notice.
    textBox1.Text = "Copyright notice: " + myFileVersionInfo.LegalCopyright;
}
Private Sub GetCopyright()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
    
    ' Print the copyright notice.
    textBox1.Text = "Copyright notice: " & myFileVersionInfo.LegalCopyright
End Sub

備註

這應該包含所有通知、法律符號、著作權日期等的全文,如果 null 檔案未包含版本資訊,則為 。

適用於