get last 4 character c#

124

get last 4 character c# -

string mystring = "Hellopeople";
string lastFour =  mystring.Substring(mystring.Length - 4 , 4);

Console.WriteLine(lastFour);

Comments

Submit
0 Comments