Was this page helpful?

ChangeType Method

    ChangeType(object value, Type type)

    public static object ChangeType(object value, Type type);
    Wrapper on top of Convert.ChangeType(object value, Type conversionType) to add handling of MindTouch Dream base types.

    Parameters

    Name Type Description
    value object Value to convert.
    type Type Type to convert value into.

    Returns

    Type: object
    Value converted to type, if possible.

    Exceptions

    Exception Condition
    InvalidCastException  

    ChangeType(object value)

    public static T ChangeType(object value);
    Generic version of SysUtil.ChangeType(object value, Type type) to allow type change without having to cast the output to the desired type.

    Generic Parameters

    Parameter T

    Type to convert the value into.
    Constraints:
    none

    Parameters

    Name Type Description
    value object Value to convert.

    Returns

    Type: T
    Converted value, if possible.

    Exceptions

    Exception Condition
    InvalidCastException  
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by