In LINQ, you can find the average of the given sequence by using the Average method. This method returns the average of the elements present in the given sequence or collection. It returns nullable, non-nullable decimal, double, floats, int, etc. values. It does not support query syntax in C#, but it supports in VB.NET. It is available in both Enumerable and Queryable classes in C#.
The sequence is: 20 45 50 79 90 79 89 100 567 29 Average is: 114.8
Average salary of the Employees: 36666.6666666667
- LINQ | How to find the sum of the given Sequence?
- LINQ | How to find aggregate of the given sequence?
- LINQ | How to find maximum value of the given sequence?
- LINQ | How to find minimum value of the given sequence?
- Count the number of element present in the sequence in LINQ?
- LINQ | Set Operator | Except
- LINQ | Let Keyword
- What is Query in LINQ?
- LINQ | Filtering Operator | where
- LINQ | Element Operator | Last
- LINQ | Quantifier Operator | All
- LINQ | Method Syntax
- LINQ | Quantifier Operator | Any
- LINQ | Quantifier Operator | Contains
- Aggregation Function in LINQ
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.