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
kodingwindow@kw:~/csharp$ dotnet run
———————————————————————————————————————————
Program to find the length of a given string
———————————————————————————————————————————
Enter the string KODINGWINDOW
Length of string is 12
———————————————————————————————————————————
kodingwindow@kw:~/csharp$
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.