IReadOnlyRegionEdit::CreateReadOnlyRegion Method (Span)

 

Marks a span of text in this buffer as read-only. The span remains read-only until the IReadOnlyRegion is removed.

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

IReadOnlyRegion^ CreateReadOnlyRegion(
	Span span
)

Parameters

span
Type: Microsoft.VisualStudio.Text::Span

The span to mark as read-only.

Return Value

Type: Microsoft.VisualStudio.Text::IReadOnlyRegion^

The IReadOnlyRegion used to track this read-only region. This object will be used to remove the read-only region.

Exception Condition
ArgumentNullException

span is null.

ArgumentOutOfRangeException

span is past the end of the buffer.

The region is created edge exclusive by default.

Return to top
Show: