That's a better demo code

   edit
Follow


Lately I ranted a bit about the responsibility of community leaders, to not present totally crappy code, at least not without a disclaimer.

This is a better way of doing that. Another great post from Mike.

I might have also try-catch-ed the

(HttpWebRequest)WebRequest.Create(url)

bit, but anyway that’s good code for people to copy&paste into their project without leaving HttpWebResponses and other Streams in danger of hanging loose.


     Tweet Follow @kenegozi