BytesRoad.Net.Sockets.SocketEx.GetTimeoutValue C# (CSharp) Метод

GetTimeoutValue() приватный Метод

private GetTimeoutValue ( int val, string propName ) : int
val int
propName string
Результат int
        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; 
        }