Yosuva
Yosuva Test Automation Engineer at Cognizant

How to compare Money values using c#?

How to compare Money values using c#?

In this post, you will learn money comparison using c#

To get only number from the string

string amount="5000";
decimal converted_amount = decimal.Parse(amount);
if(converted_amount==5000)
{
Console.WriteLine("PASS");
}
else
{
Console.WriteLine("FAIL");
}

comments powered by Disqus