Esempio n. 1
0
        public static object smethod_41(Type type_1)
        {
            if (!type_1.smethod_12())
            {
                return(null);
            }
            switch (Class181.smethod_0(type_1))
            {
            case Enum17.Char:
            case Enum17.SByte:
            case Enum17.Int16:
            case Enum17.UInt16:
            case Enum17.Int32:
            case Enum17.Byte:
            case Enum17.UInt32:
                return(0);

            case Enum17.Boolean:
                return(false);

            case Enum17.Int64:
            case Enum17.UInt64:
                return(0L);

            case Enum17.Single:
                return(0f);

            case Enum17.Double:
                return(0.0);

            case Enum17.DateTime:
                return(new DateTime());

            case Enum17.DateTimeOffset:
                return(new DateTimeOffset());

            case Enum17.Decimal:
                return(0M);

            case Enum17.Guid:
                return(new Guid());

            case Enum17.BigInteger:
                return(new BigInteger());
            }
            if (smethod_9(type_1))
            {
                return(null);
            }
            return(Activator.CreateInstance(type_1));
        }
Esempio n. 2
0
 public static bool smethod_0(object object_0, object object_1)
 {
     if ((object_0 == null) && (object_1 == null))
     {
         return(true);
     }
     if ((object_0 != null) && (object_1 == null))
     {
         return(false);
     }
     if ((object_0 == null) && (object_1 != null))
     {
         return(false);
     }
     if (!(object_0.GetType() != object_1.GetType()))
     {
         return(object_0.Equals(object_1));
     }
     if (Class181.smethod_14(object_0) && Class181.smethod_14(object_1))
     {
         return(Convert.ToDecimal(object_0, CultureInfo.CurrentCulture).Equals(Convert.ToDecimal(object_1, CultureInfo.CurrentCulture)));
     }
     return(((((object_0 is double) || (object_0 is float)) || (object_0 is decimal)) && (((object_1 is double) || (object_1 is float)) || (object_1 is decimal))) && Class192.smethod_5(Convert.ToDouble(object_0, CultureInfo.CurrentCulture), Convert.ToDouble(object_1, CultureInfo.CurrentCulture)));
 }