现在的位置: 首页 > 综合 > 正文

switch表达式和case条件支持的类型

2013年06月23日 ⁄ 综合 ⁄ 共 128字 ⁄ 字号 评论关闭

如果是不支持的类型,则编译时给出如下错误:

A switch expression or case label must be a bool, char, string, integral, enum, or corresponding nullable type

从错误中可以得知支持的类型。

抱歉!评论已关闭.