Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

C Sharp string.Length

From Coderwiki
Revision as of 11:14, 15 August 2025 by Dylan (talk | contribs) (new: info, example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In C Sharp, any string has the Length property.

You can access it by calling .Length on any string object.

Example

string name = "Bob";
int length = name.Length;
Console.WriteLine(name);
Contents