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
ICompilationelementType
IType
Returns
Create(ITypeReference)
Creates a nullable type reference.
public static ParameterizedTypeReference Create(ITypeReference elementType)
Parameters
elementType
ITypeReference
Returns
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
IsNonNullableValueType(IType)
public static bool IsNonNullableValueType(IType type)
Parameters
type
IType
Returns
IsNullable(IType)
Gets whether the specified type is a nullable type.
public static bool IsNullable(IType type)
Parameters
type
IType