All LINQ programs in C# with examples

Basically LINQ makes the programs more readable so other developers can easily understand and maintain it. In this exercise we will learn to implement and use LINQ in C# programming language using following examples.

  1. Write a program in C# to find the positive numbers from a list of numbers using two where conditions in LINQ Query
  2. Write a program in C# to display the name of the days of a week in LINQ Query
  3. Write a program in C# to create a list of numbers and display the numbers greater than 20 in LINQ Query
  4. Write a program in C# to find the number of an array and the square of each number in LINQ Query
  5. Write a program in C# to display the top n-th records in LINQ Query
  6. Write a program in C# to display the number and frequency of number from given array in LINQ Query
  7. Write a program in C# to display the characters and frequency of character from given string in LINQ Query
  8. Write a program in C# to find the uppercase words in a string in LINQ Query
  9. Write a program in C# to Remove Items from List using remove function by passing object in LINQ Query
  10. Write a program in C# to remove a range of items from a list by passing the start index and number of elements to remove in LINQ Query
  11. Write a program in C# to generate a Cartesian Product of two sets in LINQ Query
  12. Write a program in C# to arrange the distinct elements in the list in ascending order in LINQ Query

Leave a Comment