I have a piece of code and I need to shorten a string that I have in a variable. I was wondering how could I do this. My code is below.
string test = Console.ReadLine();
if(string.Length > 5)
{
//shorten string
}
Console.WriteLine(test);
Console.ReadLine();