Binary To Decimal Program Help
Hi I'm having trouble trying to determine whether or not the current index in my inputted binary string is a 0 or 1. I've been trying to look for different ways to figure out how to do this, but I get stumped every time. Can someone push me in the right direction? Thank you.
8 Replies
A single equal sign is assignment in C#.
Use two equals signs for equality.
Yeah I've tried both, but it says I can't use "==" for char and string types
Should I be converting something to the char/string type so that it can work?
Use single quotes for a char literal, not double quotes
oooooooh
yeah that fixed it, thanks!
would you say that i'm heading in the right direction for this program?
Unclear 🙂
Got it, will work on this more. Thanks for the help 🙂
You can probably use the Math.Pow function instead of re-implementing that yourself, btw.
Ooh for sure
i'll definitely look into that