Scott,
      I would stick to Strings or StringBuilder.  There was an excellent
Episode of "The Show" on MSDN a while back that discussed memory allocation
under .Net (maybe CLR Optimisation:
http://msdn.microsoft.com/theshow/episode027/TranscriptText.asp).  The gist
is the GC handles allocations that last a short period of time (< 1-2 sec)
very well (more detail in the transcript).

As for Best practices -- as a rule, I use the framwork classes where
possible, since MS can always improve the perfomance of them.  If I use char
arrays (or the like), improvements will never occur.

Finally I never optimise without running a profiler first.

Try CompuWare's Community Edition
http://www.compuware.com/products/devpartner/profiler/

Also try the Allocation Profiler from the .NET Dev team
http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=allocation%20profiler

Good Luck
Mark Levison

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to