Method 1:
int numLines = aDiff.text.Length - aDiff.text.Replace _
(Environment.NewLine, string.Empty).Length;
Method 2:
int numLines = aDiff.text.Split('\n').Length;
Both will give you number of lines in text.
Method 1:
int numLines = aDiff.text.Length - aDiff.text.Replace _
(Environment.NewLine, string.Empty).Length;
Method 2:
int numLines = aDiff.text.Split('\n').Length;
Both will give you number of lines in text.