Re: Hex To Decimal - help pls?



On 1/27/11 3:09 PM, xlar54 wrote:
Hey folks, I am in need of a hex to decimal conversion method, but
there are some ugly constraints:

1) All integer types have to be of type ushort (max size is $FFFF or
65535)
2) I can not use any family of the Convert class, Math class, or
System.Globalization.Numberstyles. Has to be all old-school.

(this isnt a homework assignment..) If someone could help, I would
appreciate it. Fought with this all evening.

Hex to decimal conversion is trivial. You can find umpteen examples via Google.

Your #2 requirement seems bizarre to me. What's the point of writing C# code if you're going to do it with one hand tied behind your back? :)

Pete
.