数字转换成bool类型值 0,1,2,-1

C# 2022-02-20 13:51:56

数字转换成bool类型值 0,1,2,-1本实例在开发中有用的可以参考,总结:convert.tobool(0)==false, 非0 则均为true。