What is the default boolean value in C#?

前端 未结 6 933
心在旅途
心在旅途 2020-12-05 09:17

A boolean (bool) can\'t be null. And:

bool foo; if(foo){} // Use of unassigned local variable \'foo\'

Why the default value is

6条回答
提交回复
热议问题