Check if null Boolean is true results in exception

后端 未结 7 1373
难免孤独
难免孤独 2020-11-28 05:20

I have the following code:

Boolean bool = null;

try 
{
    if (bool)
    {
        //DoSomething
    }                   
} 
catch (Exception e) 
{
    Syst         


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