Click here to Skip to main content
16,005,120 members
Home / Discussions / C#
   

C#

 
AnswerRe: Integrate Python as a scripting language? Pin
leppie19-Dec-03 21:34
leppie19-Dec-03 21:34 
GeneralRe: Integrate Python as a scripting language? Pin
sumo_guy20-Dec-03 7:13
sumo_guy20-Dec-03 7:13 
GeneralMDI in C# Pin
ASGill19-Dec-03 16:24
ASGill19-Dec-03 16:24 
GeneralRe: MDI in C# Pin
Heath Stewart20-Dec-03 20:21
protectorHeath Stewart20-Dec-03 20:21 
GeneralPowerpoint problem with axwebbrowser Pin
DeusingMono19-Dec-03 14:54
DeusingMono19-Dec-03 14:54 
GeneralWeb Calendar Control Pin
Big Orange19-Dec-03 12:03
Big Orange19-Dec-03 12:03 
GeneralRe: Web Calendar Control Pin
Big Orange24-Dec-03 5:45
Big Orange24-Dec-03 5:45 
GeneralEfficient String Concatenation Pin
Larry Antram19-Dec-03 11:46
Larry Antram19-Dec-03 11:46 
I have a function that needs to accept a string and append it to another string. I initially implemented it like this:

private String big = "";
...

private void OnIncoming( String small )
{
   big += small;
   big += "\r\n";
}
However this seems to be extremely inefficient. Receiving about 300K of text (which happens to come from the net) in small amounts takes about 1 minute. However, if I simply comment out the contents of OnIncoming (the two += lines) it takes about 5 seconds. So it appears the string concatenation is causing the problem.

How can I improve this? I need to take a bunch of little strings (one at a time), and concatenate them into a larger string. Any suggestions as to what would be the most efficient way to do this in C#?

Thanks in advance for any suggestions, ideas, or assistance!
GeneralRe: Efficient String Concatenation Pin
Heath Stewart19-Dec-03 11:58
protectorHeath Stewart19-Dec-03 11:58 
GeneralC# string to CString marshaling Pin
jerrycainjr19-Dec-03 9:15
jerrycainjr19-Dec-03 9:15 
GeneralRe: C# string to CString marshaling Pin
Heath Stewart19-Dec-03 9:47
protectorHeath Stewart19-Dec-03 9:47 
QuestionAdding a button to IE's main toolbar? Pin
Andreas Philipson19-Dec-03 8:43
Andreas Philipson19-Dec-03 8:43 
AnswerRe: Adding a button to IE's main toolbar? Pin
Heath Stewart19-Dec-03 9:26
protectorHeath Stewart19-Dec-03 9:26 
GeneralInserting the same textbox in multiple controls Pin
spindar19-Dec-03 7:44
spindar19-Dec-03 7:44 
GeneralRe: Inserting the same textbox in multiple controls Pin
Not Active19-Dec-03 8:01
mentorNot Active19-Dec-03 8:01 
GeneralRe: Inserting the same textbox in multiple controls Pin
Heath Stewart19-Dec-03 8:27
protectorHeath Stewart19-Dec-03 8:27 
GeneralDataGrid, don't want the last row (new record), how to remove Pin
Member 61691919-Dec-03 7:29
Member 61691919-Dec-03 7:29 
GeneralRe: DataGrid, don't want the last row (new record), how to remove Pin
sthect19-Dec-03 8:00
sthect19-Dec-03 8:00 
GeneralRe: DataGrid, don't want the last row (new record), how to remove Pin
Member 61691919-Dec-03 9:17
Member 61691919-Dec-03 9:17 
GeneralRe: DataGrid, don't want the last row (new record), how to remove Pin
dubor9-Jan-04 6:34
dubor9-Jan-04 6:34 
GeneralParsing an LDIF file without using ldifde or Active Directory Pin
sonicflame19-Dec-03 6:10
sonicflame19-Dec-03 6:10 
GeneralEntity point-to-point communication...suggestions Pin
LongRange.Shooter19-Dec-03 5:11
LongRange.Shooter19-Dec-03 5:11 
GeneralRe: Entity point-to-point communication...suggestions Pin
Heath Stewart19-Dec-03 6:13
protectorHeath Stewart19-Dec-03 6:13 
GeneralRe: Entity point-to-point communication...suggestions Pin
LongRange.Shooter19-Dec-03 7:14
LongRange.Shooter19-Dec-03 7:14 
GeneralRe: Entity point-to-point communication...suggestions Pin
Heath Stewart19-Dec-03 8:26
protectorHeath Stewart19-Dec-03 8:26 

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.