Get string length and output string
using System;
class MainClass {
public static void Main() {
string str1 = "ABCDEabcde1234567890";
Console.WriteLine("str1: " + str1);
Console.WriteLine("Length of str1: " + str1.Length);
}
}
Output str1: ABCDEabcde1234567890
Length of str1: 20
|
HTML code for linking to this page:
|