Skip to content

Instantly share code, notes, and snippets.

View light-traveller's full-sized avatar

light-traveller light-traveller

View GitHub Profile
@light-traveller
light-traveller / Enumeration.cs
Created January 24, 2021 04:16 — forked from spewu/Enumeration.cs
Better enums in C# for DDD ... based on Jimmy Bogards Enumeration class
using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
[Serializable]
[DebuggerDisplay("{DisplayName} - {Value}")]
public abstract class Enumeration<TEnumeration, TValue> : IComparable<TEnumeration>, IEquatable<TEnumeration>
where TEnumeration : Enumeration<TEnumeration, TValue>
where TValue : IComparable