I have a situation that I cannot change: one database table (table A) accepts 6 decimal places, while a related column in a different table (table B) only has 3 decimal plac
This is a very simple one line code to get count of decimals in a Decimal:
decimal myDecimal = 1.000000021300010000001m; byte decimals = (byte)((Decimal.GetBits(myDecimal)[3] >> 16) & 0x7F);