Hello,
A decimal can be much greater than an integer, however if the decimal is not so big, you may also try like the following
decimal d = 6.44m;
int w = (int)d;
decimal f = d - w;
Console.WriteLine(w);
Console.WriteLine(f);
If you are using big numbers, please take BinaryCoder's idea
Let me know if you want VB.NET code.
Thanks,
Rong-Chun Zhang
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact
msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.