I know I can just typecast the result from GetHttpCode() to HttpStatusCode, but I don't like to typecast enums. Especially because the MSDN doc doesn't explicitely say that the values of the enums are always the exact corresponding http status code.
I feel that GetHttpCode() should just return HttpStatusCode.
Should I just stop complaining and typecast?
catch(HttpException ex)
{
    switch((HttpStatusCode)ex.GetHttpCode())
    {
        case HttpStatusCode.NotFound: 
            // Do stuff...
            break;
        // More cases...
    }
}
EDIT: note that HttpWebResponse.StatusCode is of type HttpStatusCode