What's the difference between “bool” and “bool?”?

后端 未结 8 1854
栀梦
栀梦 2020-12-08 12:44

I use the \"bool\" type for variables as I was used to in C++, and I try to put the values of functions or properties I expect to be boolean into my variable. However I ofte

8条回答
  •  执笔经年
    2020-12-08 13:43

    bool means you can have values of true and false. bool? means you can have a value of true, false, and null.

    It works for datetime and booleans.

提交回复
热议问题