Monthly Archives: March 2011

Quick & Dirty: Download A File From The Internet

Here’s a quick and dirty way to download a file from the internet: public bool DownloadFile(string sourceUrl, string targetFilePath) {       byte[] buff = new byte[MASSIVE_NUMBER];         try       {             WebRequest req = WebRequest.Create(sourceUrl);             WebResponse response = … Continue reading

Posted in Uncategorized | 4 Comments

Win9X? What is that?

While mucking around the .NET framework sometime back, I stumbled across something I thought was kind of funny. Funny only in that I had almost forgotten about it (kind of). Anyway, I was working on a demo, and was checking … Continue reading

Posted in Uncategorized | Leave a comment

Awesome Operators

Some operators are just more awesome than others. Here are some of my faves. Let’s start with the ternary conditional operator (?:). I have loved this one since C, and is one of those that cannot be overloaded (another awesome … Continue reading

Posted in Uncategorized | Leave a comment

C# XOR Compiler ‘Error’

I may as well start with my pet peeve… The C# compilers failure to generate correct code for the following expression: Before C#, I (and many others, I’m sure) used that in C. For those who are not familiar with … Continue reading

Posted in Uncategorized | Leave a comment