The question has to asked:

Where does this 'input string' come from?

If it comes from some abstract exercise on your part then your time would be

better utilised musing in the question of 'Life, The Universe and

Everything'.

If it comes from some 'real world' data provider/producer, then you need to

asking the question of that data provider/producer because they, and only

they, can tell you what rules need to be applied and how they should be

applied. If they can't, or won't tell you, then you are, (excuse my french),

farting against thunder.

That said, I must add -

The decimal system has a widely acccepted set of rules that allow one to 'do

math' on decimal numbers, regardless of whether the operands are integral or

fractional. However, the decimal representation of a value must always be

considered in it's context. For example, the number 10.5 could represent 10

dollars and 50 cents or it could represent 10 and a half days or it could

represent 10 and a half widgets. There are accepted extensions to decimal

notation to indicate context like money being shown in conjunction with a

currency symbol and there are other extensions to indicate signage (+ and -)

while there are still other extensions to make the representation more

readable, like thousands seperators. This makes it easy to show a number

like $10,000.00 and everybody should interpret as ten thousand dollars

without any ambiguity.

Hexadecimal, on the other hand, is nothing more than a notational system and

it primary use is for representing binary values in a more human readable

form. It has no widely accepted extensions for indicating context, signage

or readability.

Take the hexadecimal value FF. What does it represent? It could represent

255 as a byte. It could represent -1 as a signed byte. It could represent 2

seperate 4-bit values of 15 each. The longer the string of hexadecimal

characters the more permuatations there are of possible meanings.

The next point is that hexadicamal notation has no concept of a 'hexadecimal

point' and therefore has no rules regarding placeholding to the right of

such a point (if it were to exist).

You cannot apply the rules that govern the use of a decimal point because

those rules relate only to the the decimal system and have no meaning in

any other 'base' system.

"Jeff Dillon" <je****@nowhere.comwrote in message

news:%2****************@TK2MSFTNGP02.phx.gbl...

How might I convert a string like 10.A (in hex) to it's decimal

equivalent? Basically I have an input string like ((1F.A + 3A.D) - 1F.E)

and need to calculate the result. Using Reflection and dynamic

compilation, I was able to create a VB.NET equivalent of the older Eval

function, but it only works with decimal numbers.

Any thoughts? I know the logic to convert, but I was hoping for some

built-in .NET methods that I could leverage

jeff