Amanda.Extensions.IsBasic C# (CSharp) Метод

IsBasic() публичный статический Метод

Checks whether a type is a "basic" type as per the C# specification or a nullable version thereof
public static IsBasic ( this t ) : bool
t this The type to check
Результат bool
        public static bool IsBasic(this Type t)
        {
            return  t == typeof(bool)        ||
                    t == typeof(byte)        ||
                    t == typeof(sbyte)       ||
                    t == typeof(char)        ||
                    t == typeof(decimal)     ||
                    t == typeof(double)      ||
                    t == typeof(float)       ||
                    t == typeof(int)         ||
                    t == typeof(uint)        ||
                    t == typeof(long)        ||
                    t == typeof(ulong)       ||
                    t == typeof(object)      ||
                    t == typeof(short)       ||
                    t == typeof(ushort)      ||
                    t == typeof(string)      ||
                    t == typeof(bool?)       ||
                    t == typeof(byte?)       ||
                    t == typeof(sbyte?)      ||
                    t == typeof(char?)       ||
                    t == typeof(decimal?)    ||
                    t == typeof(double?)     ||
                    t == typeof(float?)      ||
                    t == typeof(int?)        ||
                    t == typeof(uint?)       ||
                    t == typeof(long?)       ||
                    t == typeof(ulong?)      ||
                    t == typeof(short?)      ||
                    t == typeof(ushort?);
        }