|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Assembly: EnvDTE (in envdte.dll)
For each line in the selected text, regardless of its current mode, a TextRange object represents the virtual portion of the line in the selection. When the selection mode is Stream, the TextRange objects represent only the text that is in the selection. If some lines are longer than others, you get ranges only for lines that actually contain text.
Each time the TextRanges collection is retrieved from the selected text, the prior contents are lost.