Specifies that there is no timeout.
[Visual Basic] Public Shared InfiniteTimeout As TimeSpan [C#] public static TimeSpan InfiniteTimeout; [C++] public: static TimeSpan InfiniteTimeout; [JScript] public static var InfiniteTimeout : TimeSpan;
InfiniteTimeout is used to allow the allocation of a message's existence (TimeToBeReceived) or the time it is allowed to take to reach a queue (TimeToReachQueue). You can specify a given number of seconds, or use InfiniteTimeout to indicate that there is no timeout.
If you specify any negative value besides InfiniteTimeout for TimeToBeReceived or TimeToReachQueue, an ArgumentException exception will be thrown. Catch this exception in your code when you set either property.
Message Class | Message Members | System.Messaging Namespace | TimeToBeReceived | TimeToReachQueue