Table of Contents

Class NullableType

Namespace
ICSharpCode.Decompiler.TypeSystem
Assembly
ICSharpCode.Decompiler.dll

Static helper methods for working with nullable types.

public static class NullableType
Inheritance
NullableType
Inherited Members

Methods

Create(ICompilation, IType)

Creates a nullable type.

public static IType Create(ICompilation compilation, IType elementType)

Parameters

compilation ICompilation
elementType IType

Returns

IType

Create(ITypeReference)

Creates a nullable type reference.

public static ParameterizedTypeReference Create(ITypeReference elementType)

Parameters

elementType ITypeReference

Returns

ParameterizedTypeReference

GetUnderlyingType(IType)

Returns the element type, if type is a nullable type. Otherwise, returns the type itself.

public static IType GetUnderlyingType(IType type)

Parameters

type IType

Returns

IType

IsNonNullableValueType(IType)

public static bool IsNonNullableValueType(IType type)

Parameters

type IType

Returns

bool

IsNullable(IType)

Gets whether the specified type is a nullable type.

public static bool IsNullable(IType type)

Parameters

type IType

Returns

bool