Count int value in int array in CSharp

Description

The following code shows how to count int value in int array.

Example


using System;/*from   ww w .j  a  v  a 2 s.  co m*/
using System.Collections.Generic;
using System.Linq;
public class MainClass {
    public static void Main() {
        int[] numbers = { 10, 9, 8, 7, 6 };
        int count = numbers.Count();          
        int min = numbers.Min();              

    }
}




















Home »
  C# Tutorial »
    LINQ »




Operator
Select
Where
OrderBy
Group
Join
Let
LINQ