How to take away fraction part while formatting decimal type in .NET? I need common syntax for both variants. Is there any gentle solution?
decimal a = 1.22M;
decimal b = 1.00M;
String.Format("${0}", a); // result is $1.22
String.Format("${0}", b); // result is $1.00, should be $1, HOW?