Assign a function's returned IEnumerable<MovingAverage> value to another object

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

DoctorWhoKnew

Guest
I am calling this function:

private static IEnumerable<MovingAverage> SimpleMovingAverage(
IEnumerable<IexTradingStock> queue, int period)
.
. (omitted code)
.
{
return movingAverages;


This is the function that calls MovingAverage:

MovingAverage SMA = new MovingAverage();
SMA =
SimpleMovingAverage(stocks, period);


I get an error on this line "SMA = SimpleMovingAverage(stocks, period);" The error is "Cannot implicitly convert type 'System.Collections.Generic.IEnumerable' to 'myBackEnd.Models.MovingAverage' an explicit conversions exists (are you missing a cast)

Continue reading...
 
Back
Top