C# Tutorial Operator
Aggregate
- Aggregate string and int value in CSharp
- Aggregate two string values in CSharp
- Use Aggregate and Sum in CSharp
- Use Aggregate on an array in CSharp
- Use Aggregate on an array with tenary operator in CSharp
- Use Aggregate with for string length in CSharp
- Use Aggregate with meaningful variable names in CSharp
All
Any
- Get any string value containing " ei " in CSharp
- Use Any on empty string array in CSharp
- Use Any operator to check an attribute on an object in CSharp
- Use Any with condition in CSharp
Average
- Average an integer array in CSharp
- Average grouped values in CSharp
- Average length of the words in the string array in CSharp
- Average on results returned from a query in CSharp
- Average values from Enumerable.Range in CSharp
Cast
Concat
- Combine SequenceEqual Operator with Take, Concat and Skip in CSharp
- Concat by not using the Concat Operator in CSharp
- Concat results returned from Take and Skip in CSharp
- Concat two int arrays in CSharp
- Find out the difference between Concat and Union in CSharp
- Use Concat to merge the names of all customers and products in CSharp
Contains
ConvertAll
Count
- Count int value in int array in CSharp
- Count odd values in CSharp
- Count string starting with H in CSharp
- Count string values stored in an array in CSharp
- Select counted value in CSharp
DefaultIfEmpty
- Get default value for an object when no element is found in CSharp
- Get default value if the result is empty with DefaultIfEmpty in CSharp
Distinct
- Count distinct values in CSharp
- Get Distinct value from a string array in CSharp
- Use Linq Distinct to get the distinct value in an array in CSharp
ElementAt
- Get element at specific index in CSharp
- Get element at specific index or default value in CSharp
- Get element at specific position in CSharp
- Get object at specific index with ElementAt in CSharp
- Get the fourth number from a query in CSharp
Empty
Except
- Do Except on two int arrays in CSharp
- Do Except on two object list returned from LINQ query in CSharp
- Do Except operation between two string arrays in CSharp
- Do Except operation on results from Take in CSharp
First
- Get first even element in an array in CSharp
- Get First matchec element as a list in CSharp
- Get strings whose length matches that of the shortest string in CSharp
- Get the first element in an array in CSharp
- Get the first even number or default value in CSharp
- Get the first or the default with empty array in CSharp
FirstOrDefault
- Get First Or Default for string starting with B in CSharp
- Get First Or Default on an array in CSharp
- Get First Or Default with a Not Found Element in CSharp
- Get First string starting with H in CSharp
- Use FirstOrDefault with an attribute from an object in CSharp
Intersect
- Insersect ID values from different tables in CSharp
- Intersect results from Take and Skip in CSharp
- Intersect results from two LINQ queries in CSharp
- Intersect two arrays in CSharp
- Intersect two string arrays in CSharp
Last
- Get last element in an array in CSharp
- Get last even element in an array in CSharp
- Get last or default for empty array in CSharp
- Get Last Or Default with consitions in CSharp
- Get Last string starting with H in CSharp
- Get the last element in an array in CSharp
- Get the last even number or default value in CSharp
LongCount
Max
- Get Max value after selecting in CSharp
- Get Max value in int array using LINQ in CSharp
- Get Max value in String array using LINQ in CSharp
- Get Max value on one attribute in object list using LINQ in CSharp
- Get the Min and max value from a query in CSharp
- Use Max function with grouped value in CSharp
- Use Max to get longest word in a string array by comparing length of the string in CSharp
Min
- Get Min on an attribute for a list of object in CSharp
- Get Min value after selecting in CSharp
- Get Min value from an int array in CSharp
- Get Min value from string value in CSharp
- Get Min value on grouped value in CSharp
- Get Min value on last name field in CSharp
- Use Min to get the shortest word in a string array by comparing string length in CSharp
OfType
OrderBy
Range
- Filter a Range in CSharp
- Range Cartesian Join in CSharp
- Return int between 0 and 10 using Range in CSharp
Repeat
Reverse
- Reverse an int array in CSharp
- Reverse an object array in CSharp
- Reverse an string array in CSharp
- Reverse a Range in CSharp
- Use Linq Aggregate to reverse a string in CSharp
SelectMany
- Project each element of a sequence to an IEnumerable, and flattens the resulting sequences in CSharp
- Take and SelectMany in CSharp
- Use SelectMany with inner LINQ statement in CSharp
- Use SelectMany with ? operator in CSharp
SequenceEqual
- Combine SequenceEqual Operator with Take and Count in CSharp
- Use SequenceEqual Operator to compare a string array with itself in CSharp
- Use SequenceEqual Operator with custom IEqualityComparer in CSharp
Single
SingleOrDefault
- Get one value or default value in case of no value with SingleOrDefault in CSharp
- Get only one value from a query with Single in CSharp
Skip
- Compare Skip 5 vs Take 5 in CSharp
- Skip by index and value length in CSharp
- Skip from the first element divisible by 3 in CSharp
- Skip numbers equals 50 in CSharp
- Skip the first element in CSharp
- Skip to ignore the first x elements and outputs the rest in CSharp
- Skip with string starting with A in CSharp
- Use SkipWhile to skip based on a user function in CSharp
Sort
- Add more sorting criteria with ThenByDescending in CSharp
- Sort a object array by string length in CSharp
- Sort string array by comparing substring in CSharp
- Use OrderByDescending to sort an string array in CSharp
StartsWith
Sum
- Sum an array in CSharp
- Sum integers from Enumerable.Range in CSharp
- Sum on grouped data in CSharp
- Sum on object property in CSharp
- Sum the string length in CSharp
Take
- Get LastOrDefault returned from Take in CSharp
- Get Top Five Customers by Sales in CSharp
- Take first 3 from a LINQ result in CSharp
- Take operator outputs the first x elements, discarding the rest in CSharp
TakeWhile
- Take strings whose length is less than 10 with TakeWhile in CSharp
- Take value less than 6 with TakeWhile in CSharp
- Use TakeWhile with index in CSharp
- Use value and index with TakeWhile in CSharp
ThenBy
- Use a ThenBy clause to add more ordering condition in CSharp
- Use custom IComparer with ThenBy clause in CSharp
ToArray
- Convert an Array of Strings to Integers in CSharp
- Convert list to array with ToArray in CSharp
- Convert query to array with ToArray in CSharp
ToDictionary
- Convert Object list to Dictionary in CSharp
- Convert query result to Dictionary in CSharp
- Convert query to Dictionary with Comparer in CSharp
- Convert query to Dictionary with ToDictionary in CSharp
- Use ToDictionary to provide formated data in CSharp
- Use ToDictionary with IEqualityComparer in CSharp
ToList
- Convert query result to list with ToList in CSharp
- Convert query result to list with ToList Operator in CSharp
Union
- Union Product names and Customer names in CSharp
- Union two int arrays in CSharp
- Union two string arrays in CSharp