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: Difference between revisions

From Coderwiki
new: info, example
(No difference)

Revision as of 11:14, 15 August 2025

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