So I am making an application on visual studios and I wrote a method to return a double after going through a list of data. I printed the list and know its there but the method pretends its not there and returns the code i initialize the variable with. Help? I am a java programmer and don't know much c# so is my syntax wrong? or is my logic just flawed?
public double GetMin()
{
double currentMin = 100;
foreach (GraphData d in newList)
{
if (d.Value < currentMin)
{
currentMin = d.Value;
}
}
return currentMin - 2.5;
}