Playing with types - non-unique property and field names
Cool, I didn’t know you could do that: Of course, this doesn’t play all that well with C#: I should complete my reading of that CLI specification … Photo by Avi Richards on Unsplash
Cool, I didn’t know you could do that: Of course, this doesn’t play all that well with C#: I should complete my reading of that CLI specification … Photo by Avi Richards on Unsplash
Simple in hindsight, yet it took me a while to craft the correct search terms to come up with this solution. I can’t even find that forum post now, so hopefully this entry will save someone else some time. In a lot of solutions there exists a base class that would take the inheritor as a type reference to be able to do some work on it - …
Something that I find a use for in almost every project I work on, is the HashList (also known as a MultiMap in the Java world) in NGenerics 1.2. A HashList is a multi-valued dictionary that uses a Dictionary<TKey, IList> under the covers. It still retains dictionary semantics but handles the creation and destruction of the key/list pairs …
The Specification pattern has been added to NGenerics . In my previous post on the Specification Pattern, we explored creating specification functionality using extension methods. It’s been implemented with the operator methods (And, Or, Xor) on the actual interface, with an abstract class forming the base of all specifications. The …
One of the walls I hit the most in C# when designing classes is the lack of support for multiple inheritance, which makes that one spot for inheriting from a very valuable spot indeed. For the purposes of this discussion, we’ll start with a simple implementation of the specification pattern :
I’m one of the converted when it comes to test-driven development. One of the main “aha” moments for me is not to write unit tests - it’s writing testable code. Any code that’s testable is sure to be of a higher quality and easier to maintain than typical spaghetti code. That brings me to the second part of the title - …
As part of version 1.3 of NGenerics , I’ve removed most of the sealed keywords from the classes (where it made sense). It took me a while, but I’ve accepted the following rule (and Microsoft is of the same opinion, it seems) :
I’ve been porting an application of ours to .NET CF 2.0, Mobile 5.0 and SQL Mobile the past couple of weeks. .NET CF 2.0 is impressive. The .NET Compact Framework 1 was a bit lacking in functionality - it felt like Microsoft shipped an unfinished product. .NET CF 2 provides a lot of new functionality : Pocket Outlook Access, Phone and …
Here we go - my first post… I am working as a Systems Developer for a company in Johannesburg, specializing in Microsoft technologies (C#, SharePoint, BizTalk, SQL, the whole stack). This blog is a place where I can get my thoughts into the open and get opinions from the whole wide world (www). My intention is for this to be a learning …