c# take first 5 characters of string code example
Example 1: c# get first 5 characters of string
string result = str.Substring(0,5);
Example 2: c# remove first 5 characters from string
str = str.Substring(n); //Where n is the number of characters you want to remove