7
Reply

data type error

sathish

sathish

Dec 19 2016 6:54 AM
243
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)