MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeType­FactoryTo­Nullable­Type
Open sandboxFocus

Method ToNullableType

ToNullableType<T>(T)

Creates a nullable type from the current type. If the current type is already nullable, returns the current type. If the type is a value type, returns a Nullable<T> of this type.

Declaration
public static T ToNullableType<T>(this T type)
where T : IType
Parameters
Type Name Description
T type
Returns
Type Description
T
Type Parameters
Name Description
T