7
Answers

data type error

sathish

sathish

7y
267
1
Hi,
 
  I have assign the variable as "public string Test"
  Now I have to take the value on that as Boolean - true or false
 
  So I have made the below conversion 
   Convert.ToBoolean(Test.Equals("1") ? true : false) 
 
  but when the Test value comes as null  .. I'm gettting object reference error 

   Kindly help on this.
 
 
Thanks
Sathish 
Answers (7)