Welcome! and rules
Joel on Software
How to val() in C#?
Just "use" the Microsoft.VisualBasic namespace and set a reference to the Microsoft.VisualBasic dll, and now you can use Val. This dll is part of the core .NET framework, so there's no extra baggage for doing this in C#.
Just to be clear, "Val" is part of the Microsoft.VisualBasic.Conversion module in the Microsoft.VisualBasic namespace.
Try something like:
Nevermind. That won't work.
Thanks for the responses.
Microsoft.VisualBasic.* is a crutch.
How about using String.LastIndexOfAny to point to the end of your number, then you can simply convert it.
Steve Jones (UK)
Fog Creek Home