This project is read-only.

Version 0.3

Rating: No reviews yet
Downloads: 36
Change Set: 2053
Released: Aug 29, 2010
Updated: Aug 29, 2010 by rmiesen
Dev status: Beta Help Icon

Recommended Download

Application Enum Utilities Library Installer (w/ only TRACE symbols)
application, 1781K, uploaded Aug 29, 2010 - 24 downloads

Other Available Downloads

Application Enum Utilities Library Installer (w/ full debugging symbols)
application, 1783K, uploaded Aug 29, 2010 - 12 downloads

Release Notes

This is the third release of the Enum Utilities Library. The main focus of this release is on increasing the ease of usability of the library. To that end, I have made the following changes:
  • All utility methods are generic methods. Now you don't have to cast from the System.Enum type to your specific enum type.
  • Added a unit test for the BitArrayExtensions class that formally checks for a null parameter.

This should really be the last breaking change I make to this library.

Usability note:
  • This library has contravariance issues. Namely, attempting to pass in an enum assigned to a variable typed System.Enum will cause ArgumentExceptions to be thrown at runtime. This would also be the case if you tried to iterate over an array of diverse enum types.
    • There is no way in C# 4.0 to fix the problem without making all the utility methods non-static which, in my opinion, is a much bigger usability issue than a contravariance issue that has a full workaround.
    • Workarounds:
      • Take advantate of the dynamic keyword in C# 4.0 when you don't know the type of the enum you are assigning at compile time.
      • Use the dynamic keyword in place of System.Enum for collections of diverse enums (ex. List<dynamic> listOfEnums = new List<dynamic>( ) { Enum1.f1, Enum2.f2, Enum3.f3 }).

Reviews for this release

No reviews yet for this release.