For 10 I want 10 and not 10.00 For 10.11 I want 10.11
Is this possible without code? i.e. by specifying a format string alone simlar to {0:N2}
Thanks!
For 10 I want 10 and not 10.00 For 10.11 I want 10.11
Is this possible without code? i.e. by specifying a format string alone simlar to {0:N2}
Thanks!
decimal num = 10.11;
Console.WriteLine( num.ToString( "#0.##" ) );