Partager via


VCFileCodeModel.CodeElementFromPoint(TextPoint, vsCMElement) Method

Definition

Gets a code element at a specific location in a source file.

public:
 EnvDTE::CodeElement ^ CodeElementFromPoint(EnvDTE::TextPoint ^ Point, EnvDTE::vsCMElement Scope);
public:
 EnvDTE::CodeElement ^ CodeElementFromPoint(EnvDTE::TextPoint ^ Point, EnvDTE::vsCMElement Scope);
EnvDTE::CodeElement CodeElementFromPoint(EnvDTE::TextPoint const & Point, EnvDTE::vsCMElement Scope);
[System.Runtime.InteropServices.DispId(5)]
public EnvDTE.CodeElement CodeElementFromPoint (EnvDTE.TextPoint Point, EnvDTE.vsCMElement Scope);
[System.Runtime.InteropServices.DispId(5)]
public EnvDTE.CodeElement CodeElementFromPoint (EnvDTE.TextPoint POINT, EnvDTE.vsCMElement scope);
[<System.Runtime.InteropServices.DispId(5)>]
abstract member CodeElementFromPoint : EnvDTE.TextPoint * EnvDTE.vsCMElement -> EnvDTE.CodeElement
Public Function CodeElementFromPoint (Point As TextPoint, Scope As vsCMElement) As CodeElement
Public Function CodeElementFromPoint (POINT As TextPoint, scope As vsCMElement) As CodeElement

Parameters

PointPOINT
TextPoint

Required. A TextPoint object representing the editor location for which you want a code element.

Scopescope
vsCMElement

Required. A vsCMElement value representing the code element of the specified type that contains the editor location.

Returns

A CodeElement object.

Implements

Attributes

Remarks

CodeElementFromPoint returns the code element associated with the TextPoint based on the specified scope or granularity of containment. If no code element of the specified type contains the editor location, then CodeElementFromPoint fails.

Applies to