int GetTimeoutValue(int val, string propName)
{
if(val < 0 && (Timeout.Infinite != val))
throw new ArgumentOutOfRangeException(propName, val, "Timeout value should not be less then zero (exception is only Timeout.Infinite");
if(0 == val)
return Timeout.Infinite;
else
return val;
}