To yield or not yield

by nmgomes

Some time ago, Chris Massey challenged everyone to discuss about four interesting .NET performance questions. One of those questions was "When processing some data into a list, is it faster to build up a collection and return it as an enumerator, or use yield to create the enumerator 'on the fly'?".

Well, I also post a little contribution and surprisingly my post was one of the winners, so I won a free license to ANTS Profiler 4.

Filed in: .NET


ASP.NET - EventMappingSettingsCollection bug on Contains method

by nmgomes

Recently, while digging on ASP.NET 2.0 Health Monitoring I found a bug in the EventMappingSettingsCollection.Contains class method.

I was trying to check if an event mapping already exists but every time I try it the following exception was thrown:

System.NullReferenceException was unhandled by user code
  Message="Object reference not set to an instance of an object."
       at System.Web.Configuration.EventMappingSettingsCollection.GetElementKey(ConfigurationElement element)
       at System.Configuration.ConfigurationElementCollection.GetElementKeyInternal(ConfigurationElement element)
       at System.Configuration.ConfigurationElementCollection.BaseIndexOf(ConfigurationElement element)
       at System.Web.Configuration.EventMappingSettingsCollection.IndexOf(String name)
       at System.Web.Configuration.EventMappingSettingsCollection.Contains(String name)

I opened a bug in connect, so, if you think this is important go there and vote.

And if you think this one is not a common error ... well ... this is the second bug I found regarding Contains method from a collection class.

Filed in: .NET | ASP.NET


BitDiffer - Doing Assembly Differences

by nmgomes

Two weeks ago, Paulo posted about "The Architecture Tool Space Keeps Growing". On this post, Paulo talked about new tools and the continuous improvements in the existing ones.

Well, more recently I read this Scott Hanselman post. Here, Scott talk, apart several other things, about tools for doing Assembly Differences and between them there are new one called BitDiffer.

In the Scott tests, this tool crashed :(

Today, I took some time and install the BitDiffer version so I can explore a little.


Here are my thoughts:


  • Simple but yet complete UI
  • Fast - it took only a 3-5 seconds to compare two versions.
  • Includes a Command Line version


  • Exports only to HTML / XML format
  • Drag-And-Drop still not working
  • It's not free

Final note

BitDiffer is very similar to Framework Design Studio in functionality but when coming to usability I think it's more intuitive (even without the Drag-And-Drop).

If Gref Ennis add support for Drag-And-Drop and side-by-side comparing code changes, then I will definitely consider to buy it.

Filed in: .NET | Tools