Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TextBox.GetLineText Method (Int32)


Returns the text that is currently displayed on the specified line.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public string GetLineText(
	int lineIndex


Type: System.Int32

The zero-based line index for which to retrieve the currently displayed text.

Return Value

Type: System.String

A string containing a copy of the text currently visible on the specified line.

.NET Framework
Available since 3.0
Return to top
© 2017 Microsoft