Click or drag to resize

MessageEncoderSettingsGetOrDefaultT Method

Gets a setting, or a default value if the setting does not exist.

Namespace:  MongoDB.Driver.Core.WireProtocol.Messages.Encoders
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.13.1-v2-13-x1+a7f8afe27855f38f4f72157d11ba2ae73895502e
Syntax
public T GetOrDefault<T>(
	string name,
	T defaultValue
)

Parameters

name
Type: SystemString
The name.
defaultValue
Type: T
The default value.

Type Parameters

T
The type of the value.

Return Value

Type: T
The value of the setting, or a default value if the setting does not exist.
See Also