Thursday, January 23, 2014

My list of Visual Studio extensions

  • ReSharper (30 days trial is free) – Super useful code assistant/navigator.
  • NCrunch (free while in beta) – Continuous build and test/coverage tool.
  • C# outline – Allow collapsing of statements like if, for, etc.
  • Spell Checker – for comments and strings.
  • T4 Editor – T4 text templates syntax highlighting and intellisense.
  • VSColorOutput – Highlights errors in build output.
  • WebEssentials - For Markdown support.

Friday, August 30, 2013

Speed-up Type equality comparison

What is the fastest way to compare two System.Type objects and generally any objects with reference equality applied?
See my results for 5 * 1000 * 1000 comparisons:




And the winner is: ReferenceEquals(type1, type2) || type1.Equals(type2).
Yep, I think this approach will benefit any custom key-value map where key is Type.
Those IoC guys are good candidates.