Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String to number
Message
De
13/10/2004 07:06:51
 
 
À
12/10/2004 16:52:27
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00950700
Message ID:
00950973
Vues:
12
Hmmm, interesting. Thanks for the response and info. I imagine the actual increased inefficiency must not be too great or we would have heard about it before.

Bill

>Bill,
>
>According to the docs for Convert.ToDecimal():
>
>The return value is the result of invoking the Decimal.Parse method
>
>So, you might as well just use the Parse! <g> Actually, it doesn't say, and I don't know, if it compiles to the same IL code or not. If it does, then it really wouldn't matter which you use. If it doesn't, then that would mean that the Convert calls the Parse and that *would* be more inefficient.
>
>~~Bonnie
>
>
>>Hi Bonnie,
>>
>>Do you know of reasons/constraints etc. for choosing Parse() or Convert() in a given scenario?
>>
>>Thanks,
>>Bill
>>
>>>Jerry,
>>>
>>>Look at the Decimal.Parse() method.
>>>
>>>~~Bonnie
>>>
>>>
>>>
>>>>How can I convert a string of "25.50" to a number with the decimals?
>>>>
>>>>Thanks,
>>>>
>>>>Jerry
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform