Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataView/DataSet/DataReader
Message
From
09/01/2007 15:37:56
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
09/01/2007 12:28:10
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
01183234
Message ID:
01183953
Views:
25
            string sDispStr = "";
            foreach (DataRow TRow in DTable.Rows)
            {
                sDispStr += TRow[0] + ", " + TRow[1] + " – " + TRow[2] + TRow[11].ToString() + "\n";   
                Console.WriteLine(sDispStr);
                Console.ReadLine();
                
            }
Sam,
Can you use a StringBuilder here instead? Concatonating to a string in this method causes the runtime to create a new string and abandon the old one.

Not trying to be picky... but I learned this later than I would have preferred.
Very fitting: http://xkcd.com/386/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform