SnapshotSpan Constructor (ITextSnapshot^, Int32, Int32)

 

Initializes a new instance of a SnapshotSpan with the specified snapshot, start point, and length.

Namespace:   Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

public:
SnapshotSpan(
	ITextSnapshot^ snapshot,
	int start,
	int length
)

Parameters

snapshot
Type: Microsoft.VisualStudio.Text::ITextSnapshot^

The text snapshot on which to base the snapshot span.

start
Type: System::Int32

The starting point of the snapshot span.

length
Type: System::Int32

The length of the snapshot span.

Exception Condition
ArgumentNullException

snapshot is null.

ArgumentOutOfRangeException

start is negative or greater than snapshot.Length, or length is negative, or start + length is greater than snapshot.Length.

Return to top
Show: