I am trying to assign null value to Boolean variable but it is not taking it
null
bool b = null;
For this you need to use following code to assign NULL value.
Nullable b=null;