What interfaces do C# enums implement by default

.net-4.5, c#, enums, interface

Solution

Why not find out with a simple program?

foreach(var interfaceType in typeof(Group).GetInterfaces())
{
   Console.WriteLine(interfaceType);
}

Output:

System.IComparable
System.IFormattable
System.IConvertible

FYI, all of these come from the enum base type System.Enum, which has the following declaration according to MSDN:

[SerializableAttribute]
[ComVisibleAttribute(true)]
public abstract class Enum : ValueType, 
    IComparable, IFormattable, IConvertible

Problem

Basically, if I declare an enum in C#, what interfaces does it implement by default? ``` public enum Group { Unknown, Children, Teens, YoungAdults, Adults, } ```

Original source