IEnumerable<T> Queue.Count is not returning an integer

  • Thread starter Thread starter DoctorWhoKnew
  • Start date Start date
D

DoctorWhoKnew

Guest
I am attempting to define a queue named movingAverages with a size of queue.Count - period. I am getting an error "int IEnumerable<DateClose>.Count<DateClose>() ... - cannot be applied to method and int....

private static IEnumerable<DateClose> MovingAverage(
IEnumerable<DateClose> queue, int period)
{
Queue<DateClose> movingAverages = new Queue<DateClose>(queue.Count + period);
return movingAverages;

}

Continue reading...
 
Back
Top