Strings
Lesson 6Author : GOUP
Last Updated : September, 2020
Video Code
string greeting = "Hello";
// indexes: 01234
Console.WriteLine( greeting.Length );
Console.WriteLine( greeting[0] );
Console.WriteLine( greeting.IndexOf("llo") );
Console.WriteLine( greeting.IndexOf("z") );
Console.WriteLine( greeting.Substring(2) );
Console.WriteLine( greeting.Substring(1, 3) );