checking for number

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Servé La

    checking for number

    Is there a standard method to test if a string has a double value in it
    without using an exception?

    The only method I find is using Double.Parse(st r), but this throws an
    exception which is essentially just another goto in your code preventing
    structured programming :)


  • Ignacio Machin \( .NET/ C#  MVP \)

    #2
    Re: checking for number

    Hi,


    Try Double.TryParse


    Cheers,

    --
    Ignacio Machin,
    ignacio.machin AT dot.state.fl.us
    Florida Department Of Transportation



    "Servé La" <blabla@bestaat niet.nl> wrote in message
    news:41f10271$0 $6213$e4fe514c@ news.xs4all.nl. ..[color=blue]
    > Is there a standard method to test if a string has a double value in it
    > without using an exception?
    >
    > The only method I find is using Double.Parse(st r), but this throws an
    > exception which is essentially just another goto in your code preventing
    > structured programming :)
    >
    >[/color]


    Comment

    Working...