decimal Calculate( int card )
{
float total = (float)card/(float)deck*100;
decimal totalDecimal = (decimal)Math.Round( total, 2 );
return totalDecimal;
}
I think that should work, it’s off the top of my head and may not compile, if so let me know and I’ll try to fix it. In order to use decimal casting and regular Math.Round, you have to include the System namespace at the top.