Is Enumeration - CSharp System.Reflection

CSharp examples for System.Reflection:Type

Description

Is Enumeration

Demo Code


using System.Reflection;
using System.Linq;
using System.Collections.Generic;
using System;/*w  w w.  ja v  a  2s.  c o m*/

public class Main{
        public static bool IsEnumeration(this Type type)
        {
            return type.GetTypeInfo().IsEnum;
        }
}

Related Tutorials