Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Average C#

using System;
using System.Linq;
using System.Collections.Generic;
class Demo {
   static void Main() {
      List<int> list = new List<int> { 5, 8, 13, 35, 67 };
      double avg = Queryable.Average(list.AsQueryable());
      Console.WriteLine("Average = "+avg);
   }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# clamp 
Csharp :: increment operator c# 
Csharp :: c# how to fill a datatable 
Csharp :: how to add a gameobject 
Csharp :: c# int to string 
Csharp :: how to look around with mouse in unity 
Csharp :: upgrade asp.net core to 5.0 
Csharp :: how to stop animation unity 
Csharp :: c# return list in descending order 
Csharp :: c# serial port 
Csharp :: roman to number 
Csharp :: parsing string to int c# 
Csharp :: unit test c# exception thrown 
Csharp :: byte array to base64 c# 
Csharp :: c# console password 
Csharp :: rigidbody velocity c# unity 
Csharp :: c# remove first three characters from string 
Csharp :: delete the particular line in files in c# 
Csharp :: how to deactivate an object unity 
Csharp :: How to catch Entity Framework Errors C# 
Csharp :: c# add button to messagebox 
Csharp :: c# use api rest 
Csharp :: socket io connect to namespace 
Csharp :: asp.net core api Self referencing loop detected for property 
Csharp :: Unity gameobject visible to specific camera 
Csharp :: Read a Word Document Using C# 
Csharp :: how to get unique list in c# 
Csharp :: how to skip bin/Debug/netcoreapp3.1/ on the reltaive path 
Csharp :: string tochararray c# 
Csharp :: c# pi 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =