1
For filtering use lambda expressions
https://stackoverflow.com/questions/897466/filter-list-object-without-using-foreach-loop-in-c2-0
Arrar sorting
https://www.geeksforgeeks.org/different-ways-to-sort-an-array-in-descending-order-in-c-sharp/
0
For Filtering we can use the following methods:
Find() |
Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire Array. |
FindAll() |
Retrieves all the elements that match the conditions defined by the specified predicate. |
FindIndex() |
Searches for an element that matches the conditions defined by a specified predicate, and returns the zero-based index of the first occurrence within an Array or a portion of it. |
FindLast() |
Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire Array. |
FindLastIndex() |
Searches for an element that matches the conditions defined by a specified predicate, and returns the zero-based index of the last occurrence within an Array or a portion of it. |
LastIndexOf() |
Returns the index of the last occurrence of a value in a one-dimensional Array or in a portion of the Array.
|
For Sorting an Array use the methods as :
Sort() |
Sorts the elements in a one-dimensional array. |
