Click here to Skip to main content
15,899,474 members
Home / Discussions / C#
   

C#

 
GeneralRe: build dictionary by C#! Pin
Bill Do9-Jun-09 2:06
Bill Do9-Jun-09 2:06 
Questionhelo every body! (Sorry, english of my bad!) Pin
Bill Do8-Jun-09 23:49
Bill Do8-Jun-09 23:49 
AnswerRe: helo every body! (Sorry, english of my bad!) Pin
Christian Graus8-Jun-09 23:54
protectorChristian Graus8-Jun-09 23:54 
Questionint.Parse() and Converter.toInt() Pin
Seraph_summer8-Jun-09 23:46
Seraph_summer8-Jun-09 23:46 
AnswerRe: int.Parse() and Converter.toInt() Pin
Eddy Vluggen8-Jun-09 23:55
professionalEddy Vluggen8-Jun-09 23:55 
GeneralRe: int.Parse() and Converter.toInt() Pin
Seraph_summer9-Jun-09 0:02
Seraph_summer9-Jun-09 0:02 
AnswerRe: int.Parse() and Converter.toInt() Pin
Christian Graus8-Jun-09 23:55
protectorChristian Graus8-Jun-09 23:55 
AnswerRe: int.Parse() and Converter.toInt() Pin
saanj9-Jun-09 0:01
saanj9-Jun-09 0:01 
Hi,
Convert.ToInt32 is slower because it additonally checks the null value which int32.parse does not do. Checkout the Int32 function returned by .NET Reflector:

public static int ToInt32(string value)
{
if (value == null)
{
return 0;
}
return int.Parse(value, CultureInfo.CurrentCulture);
}

Convert.ToInt32 also uses int.parse internally. So int.parse is better as far as the performance is concerned. but it may throw exceptions if string value is not specified or an empty string is specified etc. I hope it helps.

Regards
Saank

Either you love IT or leave IT...

GeneralRe: int.Parse() and Converter.toInt() Pin
Seraph_summer9-Jun-09 0:03
Seraph_summer9-Jun-09 0:03 
GeneralRe: int.Parse() and Converter.toInt() Pin
saanj9-Jun-09 0:11
saanj9-Jun-09 0:11 
QuestionTimer in C# Pin
Håkan Axheim8-Jun-09 23:11
Håkan Axheim8-Jun-09 23:11 
AnswerRe: Timer in C# Pin
Christian Graus8-Jun-09 23:26
protectorChristian Graus8-Jun-09 23:26 
AnswerRe: Timer in C# Pin
Mirko19808-Jun-09 23:29
Mirko19808-Jun-09 23:29 
QuestionMultiple bitmaps into one final image. Pin
E3pO8-Jun-09 23:01
E3pO8-Jun-09 23:01 
GeneralRe: Multiple bitmaps into one final image. Pin
harold aptroot8-Jun-09 23:09
harold aptroot8-Jun-09 23:09 
GeneralRe: Multiple bitmaps into one final image. Pin
E3pO8-Jun-09 23:15
E3pO8-Jun-09 23:15 
AnswerRe: Multiple bitmaps into one final image. Pin
Christian Graus8-Jun-09 23:25
protectorChristian Graus8-Jun-09 23:25 
QuestionTarget machine Pin
arkiboys8-Jun-09 22:24
arkiboys8-Jun-09 22:24 
QuestionSuggest me Datagrid view event Pin
deepseeindeepsy8-Jun-09 21:39
deepseeindeepsy8-Jun-09 21:39 
AnswerRe: Suggest me Datagrid view event Pin
Mycroft Holmes8-Jun-09 21:56
professionalMycroft Holmes8-Jun-09 21:56 
GeneralRe: Suggest me Datagrid view event Pin
deepseeindeepsy8-Jun-09 22:01
deepseeindeepsy8-Jun-09 22:01 
GeneralRe: Suggest me Datagrid view event Pin
Mycroft Holmes8-Jun-09 22:10
professionalMycroft Holmes8-Jun-09 22:10 
GeneralRe: Suggest me Datagrid view event Pin
Nagy Vilmos8-Jun-09 22:11
professionalNagy Vilmos8-Jun-09 22:11 
GeneralRe: Suggest me Datagrid view event Pin
Mycroft Holmes8-Jun-09 22:14
professionalMycroft Holmes8-Jun-09 22:14 
GeneralRe: Suggest me Datagrid view event Pin
Luc Pattyn9-Jun-09 1:41
sitebuilderLuc Pattyn9-Jun-09 1:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.