我正在尝试将 null
值分配给 bool 变量,但它没有接受它
bool b = null;
最佳答案
您需要使用 nullable bool 值:
bool? b = null;
关于c# - 将 NULL 值分配给 bool 变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5362437/
我正在尝试将 null
值分配给 bool 变量,但它没有接受它
bool b = null;
最佳答案
您需要使用 nullable bool 值:
bool? b = null;
关于c# - 将 NULL 值分配给 bool 变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5362437/