[Mono-list] Convert.ToInt16 (string value, int fromBase) and friends

Dan Lewis dihlewis@yahoo.co.uk
Sun, 17 Feb 2002 10:46:59 +0000 (GMT)

> I'm working on completing the Convert class. It's really quite tedious
> but I'll be done with it really soon. The only thing that's really
> annoying now is these functions that take a string and an int that
> represents the base (must be 2, 8, 10 or 16).

Have a look at ParseNumber in
class/System/System.Text.RegularExpressions/parser.cs. You could alter this for
your purposes (be sure to add a binary case) and put it into a private method
in Convert.

Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts