I need help with a program in C# that has to convert any number (whether integer or long decimal) to any base (within reason).
The program has several text boxes (it's a win form) all starting blank. When the user adds numbers (possibly with a decimal) to one of the boxes all of the update. The default boxes are bases 2,8,10,16, and the last box has a sub box to enter a base of your choice (for if the user wanted to for example convert a number base 16 to base 7.
I do not know of any works other than Convert that has the ability to base convert.
If you do not know how to do this, at least explaining how one would do this manually would be awesome! What is 64.96(base ten) in octal?
This is a personal project. I set challenges and then set out to complete a program...
Thanks in advance for any help!!
Edit: How would I do this in C#? int BaseX is the base I need to get to. int preBaseX is the base I'm coming from. decimal outputNumber is the number I'm searching for. decimal inputNumber is where we are starting with. (it can be 650.3112 or whatever)