Condividi tramite


TextRanges.Item(Object) Method

Definition

Returns a TextRange object in a TextRanges collection.

public:
 EnvDTE::TextRange ^ Item(System::Object ^ index);
public:
 EnvDTE::TextRange ^ Item(Platform::Object ^ index);
EnvDTE::TextRange Item(winrt::Windows::Foundation::IInspectable const & index);
[System.Runtime.InteropServices.DispId(0)]
public EnvDTE.TextRange Item (object index);
[<System.Runtime.InteropServices.DispId(0)>]
abstract member Item : obj -> EnvDTE.TextRange
Public Function Item (index As Object) As TextRange

Parameters

index
Object

Required. The index of the TextRange object to return.

Returns

A TextRange object.

Attributes

Remarks

The value passed to Index is either an integer that is an index to a TextRange object in its TextRanges collection or the name of TextRange object in the collection.

The Item method throws a ArgumentException exception if the collection cannot find the object that corresponds to the index value.

Applies to