MessageEncoderSettingsGetOrDefaultT Method |
Gets a setting, or a default value if the setting does not exist.
Namespace: MongoDB.Driver.Core.WireProtocol.Messages.EncodersAssembly: MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.3.0
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