Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cast vs .ToString()
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00859235
Message ID:
00859675
Views:
14
I would guess that the cast would be faster too because there is no overhead in pushing and poping values onto the program stack. A cast should put the necessary conversion code inline with your program. Look at the compiled IL code with ILDASM and it will tell your exactly what is happening.

>>>Anybody know off-hand which is faster (or does it really matter <g>)? I would think that the cast would be faster, or better, but I don't really know.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform