VCAssemblyReference.Description 属性

获取或设置一个字符串,该字符串表示对象说明或输出组使用说明。

命名空间:  Microsoft.VisualStudio.VCProjectEngine
程序集:  Microsoft.VisualStudio.VCProjectEngine(在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

语法

声明
ReadOnly Property Description As String
string Description { get; }
property String^ Description {
    String^ get ();
}
abstract Description : string with get
function get Description () : String

属性值

类型:System.String
对象说明或输出组使用说明。

示例

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 安全性

请参见

参考

VCAssemblyReference 接口

Microsoft.VisualStudio.VCProjectEngine 命名空间

其他资源

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