Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetLineText Method

TextBox.GetLineText Method

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
)

Parameters

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft