Languages
[Edit]
EN

C# / .NET - string length

10 points
Created by:
Marcin
2471

In C# / .NET it is possible to check text length in following way.

String.Length property example

string text = "My name is John.";

Console.WriteLine("Text length is " + text.Length + " characters.");

Output:

Text length is 16 characters.

References

  1. String.Length Property - Microsoft Docs
Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.