閱讀英文

共用方式為


TextSnapshotToTextReader.Read Method (array<Char[], Int32, Int32)

Reads the specified number of characters from the current stream and writes the data to the buffer, beginning at the specified location.

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

Syntax

'宣告
Public Overrides Function Read ( _
    buffer As Char(), _
    index As Integer, _
    count As Integer _
) As Integer

Parameters

  • buffer
    Type: array<System.Char[]
    When this method returns, contains the specified character array from the current source.
  • index
    Type: System.Int32
    The place in buffer at which to begin writing.
  • count
    Type: System.Int32
    The maximum number of characters to read.

Return Value

Type: System.Int32
The number of characters that have been read. The number will be less than or equal to count, depending on whether the data is available within the stream. This method returns zero if called when no more characters are left to read.

Exceptions

Exception Condition
ArgumentNullException

buffer is null.

ArgumentOutOfRangeException

index or count is negative, or the buffer length minus index is less than count.

ObjectDisposedException

The reader is closed.

.NET Framework Security

See Also

Reference

TextSnapshotToTextReader Class

Read Overload

Microsoft.VisualStudio.Text Namespace