Share your repls and programming experiences

← Back to all posts
To binary convert .Made in c#!
Bunnytoes (166)

The (I think only) Binary converter and converting back in c# on replit! Hope you enjoy! Edit: Now convert from binary!


This won't work, since you can't specify the base when converting int to int32. (This is because int and int32 are actually the same thing, so Convert.ToInt32(int) just returns the int without doing anything.)

Bunnytoes (166)

@ANDREWVOSS I deleted the any base because errors cam but but I fixed it


Nevermind, I misread your code. I'm not sure what's causing the error when converting back.


@Bunnytoes The whole Convert thing still confuses me.

Bunnytoes (166)

@ANDREWVOSS I fixed everyhting now there is nothing wrong

Bunnytoes (166)

@ANDREWVOSS do you not understand it?
you do

Convert.ToInt32 Convert.ToString float.Parse

these are some methods to convert your thing because sometimes you need to convert it for it to work
you need to do
cs int example = Convert.ToInt32(Console.ReadLine());