共用方式為


SnapshotSpan Constructor (SnapshotPoint, Int32)

Initializes a new instance of a SnapshotSpan from an existing SnapshotPoint and a specified length.

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

Syntax

'宣告
Public Sub New ( _
    start As SnapshotPoint, _
    length As Integer _
)
public SnapshotSpan(
    SnapshotPoint start,
    int length
)
public:
SnapshotSpan(
    SnapshotPoint start, 
    int length
)
new : 
        start:SnapshotPoint * 
        length:int -> SnapshotSpan
public function SnapshotSpan(
    start : SnapshotPoint, 
    length : int
)

Parameters

Exceptions

Exception Condition
ArgumentOutOfRangeException

length is negative, or start + length is greater than the length of the snapshot.

.NET Framework Security

See Also

Reference

SnapshotSpan Structure

SnapshotSpan Overload

Microsoft.VisualStudio.Text Namespace