Reputation: 339
I have a data type of type decimal.
I want to carry out following:
if(decimalData % 0.25 !=0)
{
//do some manipulation
}
But it is giving me the above error.
Upvotes: 0
Views: 38
Reputation: 18153
Following should help you with decimal.
if(decimalData % 0.25M !=0)
{
//do some manipulation
}
A "real literal" without suffix or with the d or D suffix is of type double. You could read more on suffix here
Upvotes: 2