WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class NullableHelper

    Show / Hide Table of Contents

    Class NullableHelper

    A framework independent utility class for the new Nullable type in .NET Framework 2.0

    Inheritance
    System.Object
    NullableHelper
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.ComponentModel
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class NullableHelper

    Constructors

    NullableHelper()

    Declaration
    public NullableHelper()

    Methods

    ChangeType(Object, Type)

    Use this method instead of Convert.ChangeType. Makes Convert.ChangeType work with Nullable types.

    Declaration
    public static object ChangeType(object value, Type type)
    Parameters
    Type Name Description
    System.Object value
    System.Type type
    Returns
    Type Description
    System.Object

    ChangeType(Object, Type, IFormatProvider)

    Use this method instead of Convert.ChangeType. Makes Convert.ChangeType work with Nullable types.

    Declaration
    public static object ChangeType(object value, Type type, IFormatProvider provider)
    Parameters
    Type Name Description
    System.Object value
    System.Type type
    System.IFormatProvider provider
    Returns
    Type Description
    System.Object

    FixDbNUllasNull(Object, Type)

    Returns null if value is DBNull and specified type is a Nullable type. Otherwise the value is returned unchanged.

    Declaration
    public static object FixDbNUllasNull(object value, Type type)
    Parameters
    Type Name Description
    System.Object value
    System.Type type
    Returns
    Type Description
    System.Object

    GetUnderlyingType(Type)

    Returns the underlying type of a Nullable type. For .NET 1.0 and 1.1 this method will always return null.

    Declaration
    public static Type GetUnderlyingType(Type type)
    Parameters
    Type Name Description
    System.Type type
    Returns
    Type Description
    System.Type
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved