Benchmark Method Execution Time in C#
Photo by pixolga I often find myself debating the performance implications of various algorithms and alternate implementations. The only way to know for sure is to test the theory. Here is a quick and dirty way to benchmark the execution time of any method. public static TimeSpan Time(Action action) { Stopwatch stopwatch = Stopwatch.StartNew(); action(); stopwatch.Stop(); return [...]
Debugging WPF and Silverlight Binding Errors In Visual Studio
Recently I was working with a Microsoft Silverlight project, debugging a XAML binding error. After a few hours of searching, I found a blog describing how to alter the WPF Trace Settings to enable a more verbose output while debugging. After changing the trace level, you will see a more detailed output in the Debugger [...]