David Smith

David Smith

  • NA
  • 2k
  • 0

Search Between Two List (Normalized Both List)

Dec 19 2019 6:31 PM
Is there a better robust way to rewrite this using linq or any other way.
 
private static int getPowerIndexGreaterThanTargetPower(double target)
{
for (int i = 0; i < _color.PowerList.Count(); i++)
{
for (int j = 0; j < _color.PowerList[i].Count(); j++)
{
if (_color.PowerList[i][j] > target)
{
return j;
}
}
}
return -1;
}

Answers (1)