Mark Tabor

Mark Tabor

  • 584
  • 2k
  • 464.6k

String is null and not identifiable

Aug 8 2023 11:29 AM

I have a parameter in method with name as Course its a string type and default value is null  now i am not assigning it any value and it have defult value of null I wrote if condition

if(Course!=null  || Course!="" || Course != "null")

{

 

}

my parameters is null but the if conditio always get true even if my Course is null why it is so


Answers (10)