cdmckay

Stories kicked by cdmckay

Dnum(couchware.ca)

submitted by cdmckaycdmckay(30) 2 years, 8 months ago

Dnum is a static class for accessing enumeration values much like the built-in .NET Enum class. Unlike Enum, Dnum is type-safe, reducing the number of enum-related runtime errors and eliminating the need for tedious, error-prone and inelegant down-casts. read more...

add a comment |category: |Views: 14

tags: another

Inconsistencies in the .NET Enum class(couchware.ca)

submitted by cdmckaycdmckay(30) 2 years, 8 months ago

During a recent project of mine, I had to do a lot of enum manipulation using the .NET Enum class and I have to say I wasn’t impressed. Besides the shortcoming of it not being a generic class (and thus not being especially type-safe), Enum also has some strange inconsistencies in terms of how it handles matched integral types. read more...

add a comment |category: |Views: 12

tags: another

High-Performance Virtual Constructors(mobilecommerceonline.com)

submitted by _BK__BK_(20) 2 years, 8 months ago

It is very convenient to create instances of derived types based on configuration files. Problems arise when one tries to use generics to do this, however. The reason is that the compiler surreptitiously uses reflection-based code behind the scenes, greatly diminishing performance. This technique will show you how to use some LINQ features to eliminate the performance hits, increasing the speed of your virtual constructor by 16,000%. read more...

add a comment |category: |Views: 18

tags: another

Arbitrary Enumeration Associations(mobilecommerceonline.com)

submitted by _BK__BK_(20) 2 years, 8 months ago

This article explains how to bind searchable, user-defined attributes to enumerations. A generic class is provided to query static associations between attributes and enumeration fields. read more...

add a comment |category: |Views: 27

tags: another

Joshua Bloch’s Builder Pattern in C#(couchware.ca)

submitted by cdmckaycdmckay(30) 2 years, 10 months ago

An article discussing how to use Joshua Bloch's Java Builder pattern in C#. The article discusses more than one approach to modifying the pattern to make Bloch's Builder work with C# semantics. read more...

add a comment |category: |Views: 14

tags: another