Raja

Raja

  • 529
  • 2k
  • 343.7k

How to pass Empty Decimal Value?

Apr 12 2017 7:08 AM
I have use below two for Allocate empty value to string and pass the empty string value.

string test = "";
string test1 = string.Empty;
 
But i use decimal as empty

decimal test3 = ""; 
this is show
Cannot Implicitly convert type 'string' to 'decimal'
 and try another to refer in  online to use for fix this 
 
string test1 = string.Empty;
decimal test2 = decimal.Parse(test1);
but it shows 
Input string was not in a correct format. 

Answers (6)