Click here to Skip to main content
15,890,185 members
Home / Discussions / C#
   

C#

 
AnswerRe: Working with a strange data type [modified] Pin
ChrisKo19-Sep-07 13:45
ChrisKo19-Sep-07 13:45 
GeneralRe: Working with a strange data type Pin
Klazen19-Sep-07 15:37
Klazen19-Sep-07 15:37 
QuestionMessages to a hidden window? Pin
hauptmatter19-Sep-07 12:15
hauptmatter19-Sep-07 12:15 
AnswerRe: Messages to a hidden window? Pin
mav.northwind19-Sep-07 19:13
mav.northwind19-Sep-07 19:13 
QuestionReportDocument and printtoprinter Pin
Saamir19-Sep-07 11:10
Saamir19-Sep-07 11:10 
QuestionClean up while Session State is set to SQLServer Pin
f_coy19-Sep-07 10:16
f_coy19-Sep-07 10:16 
QuestionPerformance question when generating a large batch file Pin
Dan Neely19-Sep-07 8:52
Dan Neely19-Sep-07 8:52 
AnswerRe: Performance question when generating a large batch file Pin
Dave Kreskowiak19-Sep-07 8:58
mveDave Kreskowiak19-Sep-07 8:58 
Yes, the second one is using a StringBuild to build a very large string, then calling ToString on it to create a new String object, then your writing the new string out to a file.

The two pieces of code are no doing the same thing. Your appending some data to a StringBuild, then creating a new String of all the data, appending some more data, creating a new String of all that data, ..., .... The string is getting bigger and bigger and bigger and your recreating the beginning part of the string over and over again with each pass. Your writing out something akin to:
1111 11112222 111122223333 1111222233334444 11112222333344445555 111122223333444455556666

whereas the first little snippet is doing this:
1111
2222
3333
4444
5555
6666



A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: Performance question when generating a large batch file Pin
Luc Pattyn19-Sep-07 9:49
sitebuilderLuc Pattyn19-Sep-07 9:49 
GeneralRe: Performance question when generating a large batch file Pin
Dave Kreskowiak19-Sep-07 10:03
mveDave Kreskowiak19-Sep-07 10:03 
GeneralRe: Performance question when generating a large batch file Pin
Dan Neely19-Sep-07 11:06
Dan Neely19-Sep-07 11:06 
GeneralRe: Performance question when generating a large batch file Pin
Luc Pattyn19-Sep-07 11:18
sitebuilderLuc Pattyn19-Sep-07 11:18 
QuestionPages file attribute. Pin
Lord_Veralix19-Sep-07 7:43
Lord_Veralix19-Sep-07 7:43 
AnswerRe: Pages file attribute. Pin
Dave Kreskowiak19-Sep-07 8:52
mveDave Kreskowiak19-Sep-07 8:52 
QuestionRe: Pages file attribute. Pin
Lord_Veralix19-Sep-07 9:25
Lord_Veralix19-Sep-07 9:25 
AnswerRe: Pages file attribute. Pin
Dave Kreskowiak19-Sep-07 10:05
mveDave Kreskowiak19-Sep-07 10:05 
AnswerRe: Pages file attribute. Pin
Lord_Veralix20-Sep-07 16:48
Lord_Veralix20-Sep-07 16:48 
GeneralRe: Pages file attribute. Pin
Dave Kreskowiak20-Sep-07 17:16
mveDave Kreskowiak20-Sep-07 17:16 
GeneralRe: Pages file attribute. Pin
Lord_Veralix20-Sep-07 17:27
Lord_Veralix20-Sep-07 17:27 
GeneralRe: Pages file attribute. Pin
Dave Kreskowiak20-Sep-07 17:55
mveDave Kreskowiak20-Sep-07 17:55 
AnswerRe: Pages file attribute. Pin
Big Daddy Farang20-Sep-07 6:44
Big Daddy Farang20-Sep-07 6:44 
QuestionForm Styles.. Pin
Dio2219-Sep-07 7:03
Dio2219-Sep-07 7:03 
AnswerRe: Form Styles.. Pin
Luc Pattyn19-Sep-07 7:36
sitebuilderLuc Pattyn19-Sep-07 7:36 
GeneralRe: Form Styles.. Pin
Dio2219-Sep-07 8:43
Dio2219-Sep-07 8:43 
QuestionMonthCalendar refresh problem Pin
DeepToot19-Sep-07 5:35
DeepToot19-Sep-07 5:35 

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.