Skip to content
Justice Tech School

String Basics

Strings are immutable sequences of characters. Use Length, indexing and Substring.

Example
string s = "Hello, C#";
Console.WriteLine(s.Length);
Console.WriteLine(s[0]);
Console.WriteLine(s.Substring(7));
Console.WriteLine(s.ToUpper());

Exercise

Length.

s.

Quiz Test

Can you change a string in place?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.