if it returns a type you don't even have to go through the parsing
step.  You can do a straight type cast since the enum type is integer
based...

Ala C# :
 int MyInt = (int)response.StatusCode;

Ala VB:

Dim MyInt as Integer = CType(response.StatusCode, Integer)

Of course, you can use the enum type in the select case statement just
as easily as the int, and then you can use the enum type values to
make the code much more readable.

Select case response.StatusCose
  Case HttpStatusCode.OK
    'Everything worked, nothing to do
 Case HttpStatusCode.InternalServerError 
   'Uh-oh, time to handle an error
    .....

End Select



-- 
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to