Core/CafeLib.Core/Support/Converter.cs
/// <summary>
/// Converts an object to an intrinsic type.
/// </summary>
/// <param name="type">type</param>
/// <param name="value">object value</param>
/// <returns>converted value or original object</returns>
Converts an object to an intrinsic type.
Converts an object to an intrinsic type .
public static object ConvertTo<T>(Type type, T value) where T : class
        {
            try
            {
                return _objectConverterMap[type](value);
            }
            catch
            {
                return value;
            }
        }
public static object ConvertTo < T > ( Type type , T value ) where T : class { try { return _objectConverterMap [ type ] ( value ) ; } catch { return value ; } }
Converts an object to an intrinsic type.
Converts an object to an intrinsic type .
converted value or original object
converted value or original object
type
Type
None
value
T
None