LINQ to int array means writing LINQ queries on an integer array to get required elements from integer array elements. Using LINQ queries on integer arrays, we can get the required data from the integer array without writing much code.
Following is the syntax of writing LINQ queries on integer arrays to get the required elements from array collection.
C# Code
VB.NET Code
If you observe the above syntax, we wrote the LINQ query to get data from the “numarr” integer array.
Following is the example of LINQ to Int Array to get elements from the sequence where elements value greater than 10 and less than 200.
C# Code
VB.NET Code
If you observe the above code, we used the LINQ query on the “numarr” integer array to get elements whose value is greater than 10 and less than 200.
Following is the result of the LINQ to Int Array Example.
This is how we can use LINQ queries with integer arrays to get the required data in c#, vb.net, with example.