Class NullableHelper
A framework independent utility class for the new Nullable type in .NET Framework 2.0
Inheritance
System.Object
NullableHelper
Assembly: Syncfusion.SfCellGrid.WPF.dll
Syntax
public class NullableHelper : Object
Constructors
NullableHelper()
Declaration
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
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
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
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
IsComplexType(Type)
Indicates whether the specified Type has nested properties.
Declaration
public static bool IsComplexType(Type t)
Parameters
Type |
Name |
Description |
System.Type |
t |
The Type to be checked.
|
Returns
Type |
Description |
System.Boolean |
True if nested properties are found; False otherwise.
|
IsNullableType(Type)
Declaration
public static bool IsNullableType(Type nullableType)
Parameters
Type |
Name |
Description |
System.Type |
nullableType |
|
Returns