Abdalla Omran

Abdalla Omran

  • 1.7k
  • 251
  • 5.9k

How to find the Average with No LINQ code !

May 3 2019 9:19 AM
<pre> public static TheWeather GetAverageForMonth(List<TheWeather> entries, int year, int month)
TheWeather GetItem = entries.First();
return GetItem;
from this method i would like to find the Avergage for EX year 2018, month = 5 which they are already saved in the List <TheWeather> and the The Class TheWeather has the Properties :
<pre>public class TheWeather
public DateTime dateTime { get; set; }
public double Actual_mean_temp { get; set; }
public double Record_min_temp { get; set; }
public double Record_max_temp { get; set; }
public double Actual_precipitation { get; set; }
without using the LINQ i would like to find the Average please .

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (3)