as string 和 ToString的区别例:object o1 = "string";object o2 = 1;
string s1 = o1 as string;//return "string"string s2 = o2 as string;//return nullstring s3 = o2.ToString();//return "1"
注:如果object是null,那么ToString()会抛出一个异常,而as string只是单纯的返回一个null