共用方式為


FileVersionInfo.LegalTrademarks 屬性

定義

取得商標與套用至檔案的註冊商標。

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

屬性值

檔案所適用的商標和註冊商標,如果檔案未包含版本資訊,則為 null

範例

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

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

        // Print the trademarks.
        textBox1->Text = String::Concat( "Trademarks: ", myFileVersionInfo->LegalTrademarks );
    }
private void GetTrademarks()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo =
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");

    // Print the trademarks.
    textBox1.Text = "Trademarks: " + myFileVersionInfo.LegalTrademarks;
}
Private Sub GetTrademarks()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
    
    ' Print the trademarks.
    textBox1.Text = "Trademarks: " & myFileVersionInfo.LegalTrademarks
End Sub

備註

法律商標包含所有通知、法律符號和商標編號的全文檢索。

適用於