Process2.Name 屬性

取得處理序的名稱。

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

語法

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

屬性值

型別:System.String
字串,表示處理序的名稱。

範例

' Macro code.
Imports EnvDTE
Imports EnvDTE80
Imports System.Diagnostics
Imports Microsoft.VisualBasic.ControlChars

Public Module Module1

    Sub DefaultAttachToLocalCalc()
        Dim dbg2 As EnvDTE80.Debugger2
        dbg2 = DTE.Debugger

        Dim attached As Boolean = False
        Dim proc As EnvDTE80.Process2
        For Each proc In DTE.Debugger.LocalProcesses
            If (Right(proc.Name, 8) = "calc.exe") Then
                proc.Attach2()
                attached = True
                Exit For
            End If
        Next

        If attached = False Then
            If attached = False Then
                MsgBox("calc.exe isn't running")
            End If
        End If
    End Sub
End Module

.NET Framework 安全性

請參閱

參考

Process2 介面

Name 多載

EnvDTE80 命名空間

其他資源

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