Answers for "c# get highest int list"

C#
2

c# find largest number in list

int biggest = list[0];//list refer to your list's name
for(int i = 1;i < list.Count;++i)
{
	if(list[i] > biggest)
    {
     	biggest = list[i]; 
    }
}
//now biggest will be the biggest number of the list
Posted by: Guest on March-05-2021
2

list.max c#

var list = new List<int> { 1, 2, 3, 4, 5, 6, 7, 16, 17 };  
Console.WriteLine("MAX=>" + list.Max(z => z));  
Console.WriteLine("MIN=>" + list.Min(z => z));
Posted by: Guest on July-30-2021

C# Answers by Framework

Browse Popular Code Answers by Language