博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C# bool? 的意思
阅读量:7105 次
发布时间:2019-06-28

本文共 802 字,大约阅读时间需要 2 分钟。

bool? is nullable while bool is not.

bool? first; bool second;

In the above code, first will be null while second will be false.

 

The ? symbol after a type is only a shortcut to the , bool? is equivalent to Nullable<bool>.

bool is a , this means that it cannot be null, so the Nullable type basically allows you to wrap value types, and being able to assign null to them.

bool? can contain three different values: truefalse and null.

x        y      x & y   x | y true true true true true false false true true null null true false true false true false false false false false null false null null true null true null false false null null null null null REF: https://stackoverflow.com/questions/1181491/whats-the-difference-between-bool-and-bool

转载于:https://www.cnblogs.com/watermarks/p/8469780.html

你可能感兴趣的文章
openresty下lua的function定义及调用
查看>>
TypeScript学习笔记—变量的声明
查看>>
Python基础之文本格式化
查看>>
理解javascript类数组
查看>>
ClojureScript 1.10.x 新技能 cljs.main 快速开启
查看>>
Logistic分类函数
查看>>
"irest" 一个 nodejs 命令行工具的制作过程
查看>>
Combining Character
查看>>
学习《深入react技术栈》--简介
查看>>
数据库事务的四种隔离级别
查看>>
关于Vue.nextTick()的使用
查看>>
WPF项目示例1:入门
查看>>
Dubbo 新编程模型之注解驱动
查看>>
从template到DOM(Vue.js源码角度看内部运行机制)
查看>>
Sequelize 中文文档 v4 - Working with legacy tables - 使用遗留表
查看>>
《Java Concurrency in Practice》中三个VehicleTracker例子的分析
查看>>
spring-springmvc项目介绍
查看>>
为什么要从0开始计数
查看>>
ThinkJS 3.0 正式版发布!
查看>>
js简单前端模板引擎实现
查看>>