Version

GetLines Method

Returns a object that can enumerate SnapshotLineInfos.
Syntax
'Declaration
 
Public Function GetLines( _
   Optional ByVal startLineIndex As Integer, _
   Optional ByVal enumerateBackwards As Boolean _
) As IEnumerable(Of SnapshotLineInfo)

Parameters

startLineIndex
The zero-based line offset.
enumerateBackwards
True to enumerate backwards from the startLineIndex.

Return Value

A forward or backward enumerator
Remarks

Note: even though the snapshot is thread-safe, the enumerator is not. Therefore this method should be called on the same thread that is using it (i.e. each thread accessing an enumerator should create its own). Trying to access the properties and methods of an enumerator created on another thread will raise an InvalidOperationException.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also