Console.WriteLine("———————————————————————————————————————————");Console.WriteLine("Program to find the length of a given string");Console.WriteLine("———————————————————————————————————————————");Console.Write("Enter the string ");strings=Console.ReadLine()!;Console.WriteLine("\nLength of string is "+s.Length);Console.WriteLine("———————————————————————————————————————————");
Output
codeaft@codeaft:~/csharp$ dotnet run
———————————————————————————————————————————
Program to find the length of a given string
———————————————————————————————————————————
Enter the string CODEAFT
Length of string is 12
———————————————————————————————————————————
codeaft@codeaft:~/csharp$
Dear User, Thank you for visitng Codeaft. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.