for(int i = 0; i < mYValueMax.Count; i++)
{
if (mYValueMax.ElementAt(i).Key.Equals(yPattern))
{
int max = mYValueMax.ElementAt(i).Value;
if(yValue >= max)
{
mYValueMax[mYValueMax.ElementAt(i).Key] = yValue;
}
break;
}
}