List<int> ls1 = new List<int>() { 1 };
List<int> ls2 = new List<int>() { 1, 2, 3 };
List<int> ls3 = new List<int>() { 1, 2, 3, 4, 5 };
List<int> ls4 = new List<int>() { 1, 2, 3, 4 };
int[] sayi = new int[4];
sayi[0] = ls1.Count;
sayi[1] = ls2.Count;
sayi[2] = ls3.Count;
sayi[3] = ls4.Count;
int min = sayi[0];
int maks = sayi[0];
for (int i = 1; i < sayi.Length; i++)
{
if (min > sayi[i])
min = sayi[i];
if (maks < sayi[i])
maks = sayi[i];
}
if (ls1.Count == maks)
{
MessageBox.Show("En çok elemanı olan liste : " + maks + " adet eleman ile ls1 listesi");
}
if (ls2.Count == maks)
{
MessageBox.Show("En çok elemanı olan liste : " + maks + " adet eleman ile ls2 listesi");
}
if (ls3.Count == maks)
{
MessageBox.Show("En çok elemanı olan liste : " + maks + " adet eleman ile ls3 listesi");
}
if (ls4.Count == maks)
{
MessageBox.Show("En çok elemanı olan liste : " + maks + " adet eleman ile ls4 listesi");
}
Teşekürler hocam . tek seferde sorun çözüldü.