![]() |
| ||
| Display a number in binary I thought it was a simple task at first. Don't ask me why, but I wanted to display a number in it's binary form. Manipulating bits in C# seems a bit(no pun...) harsh. The best I could come up with was : static void Displaybinary( uint i)I tried to make it generic, but that's not that much of a problem, beside the feeling I'm reenventing the wheel here, I'm not feeling so happy with the code. Can anyone make any better suggestions? |
| ||
| Re: Display a number in binary how about int myValue = 6000; little less lines of code |
| ||
| Re: Display a number in binary I knew I was somewhere on a wrong path. The obvious is often just so close, you deny to see it. Thanks for putting me on track! |
| All times are GMT -4. The time now is 9:55 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC