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

注解

法律商标包括所有声明、法律符号和商标编号的全文。

适用于