System.Enum.GetValueField C# (CSharp) Method

GetValueField() private static method

private static GetValueField ( Type type ) : FieldInfo
type Type
return System.Reflection.FieldInfo
        private static FieldInfo GetValueField(Type type)
        {
            FieldInfo[] flds;

            flds = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);

            if ((flds == null) || (flds.Length != 1))
                throw new ArgumentException(Environment.GetResourceString("Arg_EnumMustHaveUnderlyingValueField"));

            return flds[0];
        }