共用方式為


OutputGroup.DisplayName 屬性

取得使用者介面中用於此輸出群組的名稱。

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

語法

'宣告
ReadOnly Default Property DisplayName As String
string this { get; }
property String^ default {
    String^ get ();
}
abstract DisplayName : string with get
function get DisplayName () : String

屬性值

類型:String
字串,表示這個輸出群組在使用者介面中所使用的名稱。

備註

DisplayName 傳回環境中所顯示的輸出群組名稱。

範例

Sub DisplayNameExample(ByVal dte As DTE2)

    ' Before running this example, open a project.

    Dim proj As Project = dte.Solution.Projects.Item(1)
    Dim groups As OutputGroups = _
        proj.ConfigurationManager.ActiveConfiguration.OutputGroups
    Dim group As OutputGroup
    Dim msg As String = proj.Name & _
        " has the following output groups:" & vbCrLf & vbCrLf

    For Each group In groups
        msg &= "    " & group.DisplayName & vbCrLf
    Next

    MsgBox(msg)

End Sub
public void DisplayNameExample(DTE2 dte)
{
    // Before running this example, open a project.

    Project proj = dte.Solution.Projects.Item(1);
    OutputGroups groups = 
        proj.ConfigurationManager.ActiveConfiguration.OutputGroups;
    string msg = proj.Name + " has the following output groups:\n\n";

    foreach (OutputGroup group in groups)
        msg += "    " + group.DisplayName + "\n";

    MessageBox.Show(msg);
}

.NET Framework 安全性

請參閱

參考

OutputGroup 介面

EnvDTE 命名空間

其他資源

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