You first need to decide how many significant decimal digits you want to
keep. Even if you wanted to add the complexity of finding the
least-significant non-zero digit, not all numbers have one.
Once you've done that, it's simple to arithmetically determine the
fractional digits:
int digits = 3;
int scale = (int)Math.Pow(10, digits);
decimal num = 123.456m;
int fraction = (int)((num * scale) - ((int)num * scale));
Now, all that said: is there any particular reason you don't want to
convert to a string first? You are effectively doing a string-based
operation anyway, since the logic above relies on a specific textual
representation of the number. Though you don't say so explicitly, the
question itself carries an implication that the result may well be used in
the context of textual output. And a string-based solution would not be
susceptible to numerical issues such as round-off error and overflow.
I would think that the string-based solution would in fact be the most
practical approach.
Pete