Partager via


ITextBuffer.IsReadOnly Method (Span)

Determines whether a text modification or deletion would be prohibited at span due to an IReadOnlyRegion.

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

Syntax

'Déclaration
Function IsReadOnly ( _
    span As Span _
) As Boolean
bool IsReadOnly(
    Span span
)
bool IsReadOnly(
    Span span
)
abstract IsReadOnly : 
        span:Span -> bool 
function IsReadOnly(
    span : Span
) : boolean

Parameters

Return Value

Type: System.Boolean
tru e if the entire span could be deleted or replaced, otherwise false.

Exceptions

Exception Condition
ArgumentNullException

span is nulla null reference (Nothing in Visual Basic).

InvalidOperationException

TakeThreadOwnership has previously been called, and this call is being made from a different thread.

ArgumentOutOfRangeException

The End property of span is greater than the length of CurrentSnapshot.

.NET Framework Security

See Also

Reference

ITextBuffer Interface

IsReadOnly Overload

Microsoft.VisualStudio.Text Namespace