I've got a pretty compact way of removing trailing zeros in decimal values but I'd prefer a way that doesn't involve string roundtripping as mine currently does. This is my current solution:
var value = 0.010m;
value = decimal.Parse(value.ToString("G29"));
Console.WriteLine(value); // prints 0.01 (not 0.010)
So it works, but do you have an even better way?
Also, as a secondary question is decimalValue.ToString() 100% conformant to xs:decimal?