TextBuffer.numLines Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the number of lines in the TextBuffer object.
public:
virtual int numLines();
public virtual int numLines ();
abstract member numLines : unit -> int
override this.numLines : unit -> int
Public Overridable Function numLines () As Integer
Returns
The number of lines in the content.
Remarks
Lines are separated by newlines ('\n').
The following example demonstrates the numLines method.
{
TextBuffer txtb = new TextBuffer();
if (txtb.fromClipboard())
{
print "Clipboard contains ",txtb.numLines()," lines.";
}
}