共用方式為


FileCodeModel2.ElementFromID(String) Method

Definition

Used to receive specific CodeElement.

public:
 EnvDTE::CodeElement ^ ElementFromID(System::String ^ ID);
public:
 EnvDTE::CodeElement ^ ElementFromID(Platform::String ^ ID);
EnvDTE::CodeElement ElementFromID(std::wstring const & ID);
[System.Runtime.InteropServices.DispId(205)]
public EnvDTE.CodeElement ElementFromID (string ID);
[<System.Runtime.InteropServices.DispId(205)>]
abstract member ElementFromID : string -> EnvDTE.CodeElement
Public Function ElementFromID (ID As String) As CodeElement

Parameters

ID
String

The string used to identify the element.

Returns

A CodeElement object.

Attributes

Remarks

If the requested element no longer exists, the method returns E_FAIL.

Applies to