I used Joe’s way to solve this issue 🙂
decimal argument = 123.456m;
int count = BitConverter.GetBytes(decimal.GetBits(argument)[3])[2];
More Related Contents:
- Culture invariant Decimal.TryParse()
- Allow only decimal numbers in textbox in C#
- How to use localization in C#
- Remove trailing zeros
- How do you round a number to two decimal places in C#?
- When should I use double instead of decimal?
- Is there a way of setting culture for a whole application? All current threads and new threads?
- How To Represent 0.1 In Floating Point Arithmetic And Decimal
- Is a double really unsuitable for money?
- How to convert a Decimal to a Double in C#?
- What does the M stand for in C# Decimal literal notation?
- Problem parsing currency text to decimal type
- Arbitrary-Precision Decimals in C# [duplicate]
- String sorting issue in C#
- Format decimal for percentage values?
- DateTime and CultureInfo
- How to translate CultureInfo language names
- use decimal values as attribute params in c#?
- Is Int32.ToString() culture-specific?
- How to convert Decimal to Double in C#?
- .NET (3.5) formats times using dots instead of colons as TimeSeparator for it-IT culture?
- Why does a C# System.Decimal remember trailing zeros?
- Round a decimal to the nearest quarter in C#
- Replace German characters (umlauts, accents) with english equivalents
- How can I format decimal property to currency?
- Format string by CultureInfo
- DateTime.ParseExact() does not grok 24-hour time values?
- C# Check if a decimal has more than 3 decimal places?
- Raising a decimal to a power of decimal?
- How do I convert a decimal to an int in C#?