6
Reply

How to pass Empty Decimal Value?

Raja

Raja

7 years ago
322
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)