object转字符串

1、obj.tostring()

obj为空时,抛异常。

2、convert.tostring(obj)

obj为空时,返回null;

3、(string)obj

obj为空时,返回null;obj不是string类型时,抛异常。

4、obj as string

obj为空时,返回null;

posted @   杨浪  阅读(610)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示