public static bool TryConvertTo(this object obj, Type convertTo, out object outValue)
        {
            outValue = null;

            if (obj == null)
            {
                return(convertTo.IsNullableType());
            }

            object converted;

            if (!ObjectConverterter.TryConvert(obj.GetType(), obj, convertTo, out converted))
            {
                return(false);
            }

            outValue = converted;
            return(true);
        }
        public static object ConvertTo(this object obj, Type convertTo)
        {
            if (obj == null)
            {
                if (convertTo.IsNullableType() || convertTo.IsByRef)
                {
                    return(null);
                }

                throw new InvalidCastException(string.Format("Unable to case null to {1}'.", obj.GetType(), convertTo));
            }

            object converted = null;

            if (!ObjectConverterter.TryConvert(obj.GetType(), obj, convertTo, out converted))
            {
                throw new InvalidCastException(string.Format("Unable to cast '{0}' to {1}'.", obj.GetType(), convertTo));
            }

            return(converted);
        }