TheChaseMan's Frenetic SoapBox

Always looking for better ways to do things...

Best Code Snippet Ever

This code snippet is something I wrote in honor of the developers I worked with on my last contract (you know who you are, jerks! <grin>) - those who live by the mantra, “why write it in one line of code when you can write it in 50, and neatness doesn't count.“ A word of warning though...I noticed that this code doesn't seem to render correctly in RSS Bandit's preview window, but the code will compile if you copy it from my blog Web site. :-)

 

namespace

System

{class App{[System.STAThread]static void

    Main(string[] args){if(args

.Length == 0)foreach

(

       byte b

in new byte

[] {72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 10, 13}

)Main(new string[]{new string

(System.Text.ASCIIEncoding

    .ASCII.GetChars

((new byte[] {b}))

)});else System.

    Console.Write

(args[System.Convert.ToInt32(

/* Main */            

null)]);}}}


Digg!

posted on Sunday, July 04, 2004 5:28 PM

Feedback

No comments posted yet.