HttpStatus IsInRange Method C# API
Determines whether this HttpStatus is ordered between the specified pair of HttpStatus objects.

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.8.37 (1.0.0.0)
Syntax

public bool IsInRange(
	HttpStatus from,
	HttpStatus to
)

Return Value

true if this HttpStatus is ordered between the specified pair of HttpStatus objects; otherwise, false.
Remarks

The HttpStatus objects are ordered by their Code and the range is inclusive of both of the specified HttpStatus objects. No order is assumed for the from and to objects.
Examples

The following example demonstrates checking to see if an HttpStatus refers to a client error (a code in the 400s).
if (response.Result.IsInRange(HttpStatus.BAD_REQUEST, HttpStatus.UNSUPPORTED_MEDIA))
{
    Error("A client error occurred");
}
See Also