TextBox.GetLineText Method (Int32)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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