例如在SQL中查询性别,字段内容是1和0
如果在查询结果中需要将内容转换可以用到CASE WHEN
那么,在C#中需要对内容进行转换该如何写?
求大神赐教
------最佳解决方案--------------------
if else
?:
switch case
------其他解决方案--------------------
三元表达式
if else
if
else if
else
switch case break
------其他解决方案--------------------
swich case