MyClass.java
 

using System;

namespace MyApplication
{
  class Program
  {
    static void Main(string[] args)
    {
      string txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
      Console.WriteLine("The length of the txt string is: " + txt.Length);
    }
  }
}

Result:
The length of the txt string is: 26