Re:Processing Twitter's Streaming API in .NET (with under 10...
by timrobinson on Tuesday January 04, 2011 @10:57AM
(#2067371)
There's one less line of code if you use Encoding.UTF8 instead of instantiating your own object (although in principle the encoding is given to you in HttpWebResponse.ContentEncoding).
The Microsoft samples don't seem to do this, but consider putting your WebResponse and StreamReader objects in 'using' blocks: these classes implement IDisposable to ensure orderly cleanup.
The Microsoft samples don't seem to do this, but consider putting your WebResponse and StreamReader objects in 'using' blocks: these classes implement IDisposable to ensure orderly cleanup.