Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Operands of type 'decimal' and 'double'
WhatsApp
Venkatesan Jayakantham
13y
48.7
k
0
0
25
Blog
Once I tried to compare my string with the a decimal value. I got an error indicating the decimal value cannot be compared.
(Convert.ToInt(txt_LowerBound.Text) < 0.001))... Resolved by changing the conversion
(Convert.ToDecimal(txt_LowerBound.Text) < 0.001))
Now, I got the next error message.
Operator '<' cannot be applied to operands of type decimal' and 'double'
The final change to get this condition work is as below,
(Convert.ToDecimal(txt_LowerBound.Text) < 0.001M))
Cheers,
Venkatesan Prabu .J
Head, KaaShiv InfoTech
People also reading
Membership not found