Consider the following code:
void Handler(object o, EventArgs e) { // I swear o is a string string s = (string)o; // 1 //-OR- string s = o as str
string s = o as string; // 2
Is prefered, as it avoids the performance penalty of double casting.