Edit

Share via


Option.SetDefaultValueFactory(Func<Object>) Method

Definition

Sets a delegate to invoke when the default value for the option is required.

public:
 void SetDefaultValueFactory(Func<System::Object ^> ^ getDefaultValue);
public void SetDefaultValueFactory (Func<object?> getDefaultValue);
member this.SetDefaultValueFactory : Func<obj> -> unit
Public Sub SetDefaultValueFactory (getDefaultValue As Func(Of Object))

Parameters

getDefaultValue
Func<Object>

The delegate to invoke to return the default value.

Exceptions

Thrown when getDefaultValue is null.

Applies to