static private CheckTimeout ( TimeSpan timeout ) : int | ||
timeout | TimeSpan | |
return | int |
static int CheckTimeout(TimeSpan timeout)
{
try {
return checked ((int)timeout.TotalMilliseconds);
} catch (System.OverflowException) {
throw new ArgumentOutOfRangeException ("timeout");
}
}