Table of Contents

Method HasValue

Namespace
MongoDB.Driver.Core.Misc
Assembly
MongoDB.Driver.dll

HasValue<T>(T?, string)

Ensures that the value of a parameter is not null.

public static T? HasValue<T>(T? value, string paramName) where T : struct

Parameters

value T?

The value of the parameter.

paramName string

The name of the parameter.

Returns

T?

The value of the parameter.

Type Parameters

T

Type type of the value.