标签:string convert 返回 str 字符串 tostring ring string类 null
1、obj.tostring()
obj为空时,抛异常。
2、convert.tostring(obj)
obj为空时,返回null;
3、(string)obj
obj为空时,返回null;obj不是string类型时,抛异常。
4、obj as string
obj为空时,返回null;
标签:string convert 返回 str 字符串 tostring ring string类 null
原文地址:http://www.cnblogs.com/snake1118/p/7110302.html