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 minimum value of the given sequence?
- LINQ | How to find aggregate of the given sequence?
- LINQ | How to find maximum value of the given sequence?
- Count the number of element present in the sequence in LINQ?
- What is Query in LINQ?
- LINQ | Let Keyword
- LINQ | Set Operator | Except
- LINQ | Element Operator | Last
- LINQ | Method Syntax
- LINQ | Filtering Operator | where
- LINQ | Quantifier Operator | Any
- LINQ | Query Syntax
- LINQ | Quantifier Operator | Contains
- LINQ | Quantifier Operator | All
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.