Hi,
I just wanted to point out that I found a solution...
Here is the modifed NTimes function:
I just wanted to point out that I found a solution...
Here is the modifed NTimes function:
public int NTimes(dynamic values, int targetValue)
{
int answer = 0;
List<int> intVals = new List<int>();
for (var i = 0; i < values.length; i++)
intVals.Add(Convert.ToInt16(values[i]));
foreach (int val in intVals)
{
if (val == targetValue)
answer++;
}
return answer;
}
The trick was changing it to a dynamic type and then converting from there into integers.