docs.unity3d.com
    Show / Hide Table of Contents

    Class ConversionUtility

    Inheritance
    Object
    ConversionUtility
    Namespace: Unity.VisualScripting
    Syntax
    public static class ConversionUtility

    Methods

    CanConvert(Object, Type, Boolean)

    Declaration
    public static bool CanConvert(object value, Type type, bool guaranteed)
    Parameters
    Type Name Description
    Object value
    Type type
    Boolean guaranteed
    Returns
    Type Description
    Boolean

    CanConvert(Type, Type, Boolean)

    Declaration
    public static bool CanConvert(Type source, Type destination, bool guaranteed)
    Parameters
    Type Name Description
    Type source
    Type destination
    Boolean guaranteed
    Returns
    Type Description
    Boolean

    Convert(Object, Type)

    Declaration
    public static object Convert(object value, Type type)
    Parameters
    Type Name Description
    Object value
    Type type
    Returns
    Type Description
    Object

    Convert<T>(Object)

    Declaration
    public static T Convert<T>(object value)
    Parameters
    Type Name Description
    Object value
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    ConvertTo(Object, Type)

    Declaration
    public static object ConvertTo(this object source, Type type)
    Parameters
    Type Name Description
    Object source
    Type type
    Returns
    Type Description
    Object

    ConvertTo<T>(Object)

    Declaration
    public static T ConvertTo<T>(this object source)
    Parameters
    Type Name Description
    Object source
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetRequiredConversion(Object, Type)

    Declaration
    public static ConversionUtility.ConversionType GetRequiredConversion(object value, Type type)
    Parameters
    Type Name Description
    Object value
    Type type
    Returns
    Type Description
    ConversionUtility.ConversionType

    GetRequiredConversion(Type, Type)

    Declaration
    public static ConversionUtility.ConversionType GetRequiredConversion(Type source, Type destination)
    Parameters
    Type Name Description
    Type source
    Type destination
    Returns
    Type Description
    ConversionUtility.ConversionType

    HasExplicitNumericConversion(Type, Type)

    Declaration
    public static bool HasExplicitNumericConversion(Type source, Type destination)
    Parameters
    Type Name Description
    Type source
    Type destination
    Returns
    Type Description
    Boolean

    HasImplicitNumericConversion(Type, Type)

    Declaration
    public static bool HasImplicitNumericConversion(Type source, Type destination)
    Parameters
    Type Name Description
    Type source
    Type destination
    Returns
    Type Description
    Boolean

    HasNumericConversion(Type, Type)

    Declaration
    public static bool HasNumericConversion(Type source, Type destination)
    Parameters
    Type Name Description
    Type source
    Type destination
    Returns
    Type Description
    Boolean

    IsConvertibleTo(Object, Type, Boolean)

    Declaration
    public static bool IsConvertibleTo(this object source, Type type, bool guaranteed)
    Parameters
    Type Name Description
    Object source
    Type type
    Boolean guaranteed
    Returns
    Type Description
    Boolean

    IsConvertibleTo(Type, Type, Boolean)

    Declaration
    public static bool IsConvertibleTo(this Type source, Type destination, bool guaranteed)
    Parameters
    Type Name Description
    Type source
    Type destination
    Boolean guaranteed
    Returns
    Type Description
    Boolean

    IsConvertibleTo<T>(Object, Boolean)

    Declaration
    public static bool IsConvertibleTo<T>(this object source, bool guaranteed)
    Parameters
    Type Name Description
    Object source
    Boolean guaranteed
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    T

    TryConvert(Object, Type, out Object, Boolean)

    Declaration
    public static bool TryConvert(object value, Type type, out object result, bool guaranteed)
    Parameters
    Type Name Description
    Object value
    Type type
    Object result
    Boolean guaranteed
    Returns
    Type Description
    Boolean

    TryConvert<T>(Object, out T, Boolean)

    Declaration
    public static bool TryConvert<T>(object value, out T result, bool guaranteed)
    Parameters
    Type Name Description
    Object value
    T result
    Boolean guaranteed
    Returns
    Type Description
    Boolean
    Type Parameters
    Name Description
    T
    In This Article
    • Methods
      • CanConvert(Object, Type, Boolean)
      • CanConvert(Type, Type, Boolean)
      • Convert(Object, Type)
      • Convert<T>(Object)
      • ConvertTo(Object, Type)
      • ConvertTo<T>(Object)
      • GetRequiredConversion(Object, Type)
      • GetRequiredConversion(Type, Type)
      • HasExplicitNumericConversion(Type, Type)
      • HasImplicitNumericConversion(Type, Type)
      • HasNumericConversion(Type, Type)
      • IsConvertibleTo(Object, Type, Boolean)
      • IsConvertibleTo(Type, Type, Boolean)
      • IsConvertibleTo<T>(Object, Boolean)
      • TryConvert(Object, Type, out Object, Boolean)
      • TryConvert<T>(Object, out T, Boolean)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023