EN
C# / .NET - how to check string length?
0
points
In C# it is possible to check string length in the following way.
String Length property example
using System;
public class Program
{
public static void Main(string[] args)
{
string text = "This is my text...";
string anotherText = "Another text...";
Console.WriteLine( text.Length ); // 18
Console.WriteLine( anotherText.Length ); // 15
}
}
Output:
18
15