Version

GetLineCount Method

Returns the number of lines in the specified string.
Syntax
'Declaration
 
Public Shared Function GetLineCount( _
   ByVal text As String _
) As Integer
public static int GetLineCount( 
   string text
)

Parameters

text
String whose line count is to be calculated

Return Value

The number of lines based on the presence of "\r\n", "\r" and "\n" sequences within the specified text
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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