sathish

sathish

  • NA
  • 263
  • 0

data type error

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