C
cody
I want to do some validation of data field something like the following:
System.Diagnostics.Debug.Assert(decimal.Truncate(this.GesamtPreis*100)==this
..GesamtPreis*100);
so that Iam sure that no more than a certain number of decimals are stored,
but I don't want to hardcode them I want that the user can set how many
decimals are stored?
I cannot use Math.Pow() since it works with double instead of decimal so I
have rounding errors.
System.Diagnostics.Debug.Assert(decimal.Truncate(this.GesamtPreis*100)==this
..GesamtPreis*100);
so that Iam sure that no more than a certain number of decimals are stored,
but I don't want to hardcode them I want that the user can set how many
decimals are stored?
I cannot use Math.Pow() since it works with double instead of decimal so I
have rounding errors.