Solution2.ExtenderNames 屬性

取得物件的可用擴充項清單。

命名空間:  EnvDTE80
組件:  EnvDTE80 (在 EnvDTE80.dll 中)

語法

'宣告
ReadOnly Property ExtenderNames As Object
Object ExtenderNames { get; }
property Object^ ExtenderNames {
    Object^ get ();
}
abstract ExtenderNames : Object
function get ExtenderNames () : Object

屬性值

型別:System.Object
包含相容於 Automation 之字串陣列的物件。

備註

使用這個物件之 ExtenderCATID 屬性指定的 CATID,ExtenderNames 即可傳回目前這個物件適用的擴充項名稱。

範例

如需如何執行增益集程式碼的詳細資訊,請參閱 HOW TO:編譯和執行 Automation 物件模型程式碼範例

下列範例示範如何顯示開啟方案的擴充項

Sub ExtenderNamesExample(ByVal dte As DTE2)

    Dim names() As String = CType(dte.Solution.ExtenderNames, String())
    Dim exts, name As String
    For Each name In names
        exts &= name & vbCrLf
    Next

    MsgBox(dte.Solution.FullName & " has the following extenders:" & _
        vbCrLf & vbCrLf & exts)

End Sub
//you will need to add this reference to your project as well
using System.Windows.Forms;
public void ExtenderNamesExample(DTE2 dte)
{
    string[] names = (string[])dte.Solution.ExtenderNames;
    string exts = "";
    foreach (string name in names)
    {
        exts += name + Environment.NewLine;
    }

    MessageBox.Show(dte.Solution.FullName + 
        " has the following extenders:" + Environment.NewLine + 
        Environment.NewLine + exts);
}

.NET Framework 安全性

請參閱

參考

Solution2 介面

ExtenderNames 多載

EnvDTE80 命名空間

其他資源

HOW TO:編譯和執行 Automation 物件模型程式碼範例

實作及使用 Automation 擴充項