using System;
class Stuff
{
public void Foo(Nullable<bool> flag)
{
if(flag == null) { }
}
}
Select 'null' and apply 'Introduce variable'
using System;
class Stuff
{
public void Foo(Nullable<bool> flag)
{
object Null = null;
if (flag == Null) { } /* error CS0019: Operator '==' cannot be applied to operands of type 'bool?' and 'object' */
}
}
Expected result:
using System;
class Stuff
{
public void Foo(Nullable<bool> flag)
{
Nullable<bool> Null = null;
if (flag == Null) { }
}
}