Possible Duplicate:
Direct casting vs 'as' operator?
Casting vs using the 'as' keyword in the CLR
object myObject = "Hello world.";
var myString = myObject as string;
object myObject = "Hello world.";
var myString = (string)myObject;
I have seen type conversion done both ways. What is the difference?