get first 5 characters of string c# code example Example: c# get certain character from string string myString = "string"; // outputs r print(mystring[2]);