Lösningsförslag till uppgift 6.7¶
Console.WriteLine($"Längst av Hej och Hejsan är {Längst("Hej", "Hejsan")}");
string Längst(string text1, string text2)
{
if (text2.Length > text1.Length)
{
return text2;
}
else
{
return text1;
}
}