AddIn.Description 属性

获取或设置一个表示 AddIn 对象的说明的字符串。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

声明
Default Property Description As String
    Get
    Set
string this { get; set; }
property String^ default {
    String^ get ();
    void set (String^ value);
}
abstract Description : string with get, set
function get Description () : String
function set Description (value : String)

属性值

类型:System.String
一个字符串,表示 AddIn 对象的说明。

示例

Sub DescriptionExample(ByVal dte As DTE2)

    ' Display all add-ins.
    Dim addIn As AddIn
    Dim msg As String

    For Each addIn In dte.AddIns
        msg &= "    " & addIn.Name

        If addIn.Description <> "" Then
            msg &= ": " & addIn.Description & vbCrLf
        Else
            msg &= ": (No description)" & vbCrLf
        End If
    Next

    MsgBox("Available add-ins:" & vbCrLf & vbCrLf & msg)

End Sub
public void DescriptionExample(DTE2 dte)
{
    // Display all add-ins.
    string msg = "";

    foreach (AddIn addIn in dte.AddIns)
    {
        msg += "    " + addIn.Name;

        if (addIn.Description != "")
            msg += ": " + addIn.Description + "\n";
        else
            msg += ": (No description)\n";
    }

    MessageBox.Show("Available add-ins:\n\n" + msg);
}

.NET Framework 安全性

请参见

参考

AddIn 接口

EnvDTE 命名空间

其他资源

如何:编译和运行自动化对象模型代码示例