I need to provide a solution to find the shortest string in an array of string. I was thinking that it should be compare the length of each string in order to return.
This is where I was stuck
static void Main(string[] args)
{
//find the shortest string in an array of string
string[] names = new string[3]{
"Tom", "and", "jerry"
};
foreach(string name in names){
Console.Write(name + ", ");
}
Console.ReadKey();
}
Can anyone help me with the compare part and explain it
everyone...yeahh thats exactly how you get help here...