Which one is fast convert.tostring() and tostring()? [Resolved]

Posted by Allemahesh under C# on 7/25/2013 | Points: 10 | Views : 1038 | Status : [Member] [MVP] | Replies : 3
Can any one tell form below, which one is fast.
1. Convert.ToString();
2. ToString();




Responses

Posted by: Satyapriyanayak on: 7/25/2013 [Member] [MVP] Silver | Points: 50

Up
0
Down

Resolved
http://stackoverflow.com/questions/909951/with-c-sharp-which-one-is-faster-system-convert-tostring-objthatisstring-or
http://social.msdn.microsoft.com/Forums/vstudio/en-US/bf118337-6dbd-4edd-9147-fbbcba7ce6c5/what-is-the-difference-between-converttostring-and-tostring

If this post helps you mark it as answer
Thanks

Allemahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jitendrasoft09 on: 7/25/2013 [Member] [MVP] Starter | Points: 50

Up
0
Down

Resolved
Hi Allemahesh,

Obviously, ToString() will be faster because it just returns string, But

As Convert.ToString() will eventually do a cast after some overhead then return a string.

Hope you have understood.

Jitendra Kumar
If my post helps you, plz mark as an answer.

Allemahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: aswinialuri-19361 on: 7/25/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,
Refer this link it might be help full to you
http://stackoverflow.com/questions/909951/with-c-sharp-which-one-is-faster-system-convert-tostring-objthatisstring-or

Mark as Answer if it helps you
Thanks&Regards
Aswini Aluri

Allemahesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response