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
)
Public Function GetOrDefault(Of T) (
name As String,
defaultValue As T
) As T
member GetOrDefault :
name : string *
defaultValue : 'T -> 'T
Parameters
- name
- Type: SystemString
The name. - defaultValue
- Type: T
The default value.
Type Parameters
- T
- The type of the value.
Return Value
Type:
TThe value of the setting, or a default value if the setting does not exist.
See Also