HNHacker News
TopNewBestAskShowJobs

marcgravell

10 karma · joined June 9, 2011

Geek at stackoverflow
submissionscomments
marcgravell··on On Stack Overflow's recent battles with the .NET Garbage Collector
Actually, there's absolutely wrong with using + for individual expressions; it is actually the correct way of doing it (a + b + c + d compiles to String.Concat(a,b,c,d) ) - the problem is if you are doing this in a loop, where you get a lot of throwaway strings from intermediate concatenations. In a loop, you should concatenate via StringBuilder.
marcgravell··on Stack Overflow open sources their ASP.net MVC mini profiler
"Step" is a static-call to an extension method. This way allows your code to keep working fine (unchanged) for users that aren't profiling (i.e. 99.99% of the users).
marcgravell··on Stack Overflow open sources their ASP.net MVC mini profiler
Note to go with this I've now updated the nuget package (http://nuget.org/List/Packages/MiniProfiler) so it is easy to deploy. Enjoy. (also: http://marcgravell.blogspot.com/2011/06/profiling-with-knobs...)