Articles
FAQs
Login
LINQ - Array Initializer
By [)ia6l0 iii
Access over 40 UI widgets with everything from interactive menus to rich charts.
We can use LINQ to initialize elements of an array with a specified range of values. The following statement initializes an interger array with values of 20-29.
int[] sampleIntegerArray = Enumerable.Range(20, 10).ToArray();
Related FAQs
You can skip the results you want: with the LINQ - SKIP Operator
The LinQ SKIP operator lets you skip the results you want, and take the rest. See below for an code sample.
You can take only the results you want: with the LINQ - TAKE Operator
The LinQ Take operator lets you take only the results you want. See below for an code sample.
Difference of two Data Tables in LinQ
Use LinQ's Except extension on DataTable to find out the Difference between two DataTables.
Intersection of Two Data Tables in LinQ
Quickly find out the intersection of two datatables thruough the Intersect Extension.
LINQ - Array Initializer
(
465 Views
)