Skip to content

Applies to

net10.0, netstandard2.0

Overloads

  1. public static OptionElse IfHasValue<T>(this in Optional<T> source, Action<T> action) where T : notnull

  2. public static OptionElse IfHasValue<T>(this Optional<T>? source, Action<T> action) where T : notnull

1. Overload

public static OptionElse IfHasValue<T>(this in Optional<T> source, Action<T> action) where T : notnull

View source

Summary: Invokes the specified action when.

Type parameters

NameDescription
TThe type of the item.

Parameters

NameTypeDescription
in source[Optional](#The source.
actionActionThe action.

Returns: OptionElse -- The optional else extension.

2. Overload

public static OptionElse IfHasValue<T>(this Optional<T>? source, Action<T> action) where T : notnull

View source

Summary: Invokes the specified action when.

Type parameters

NameDescription
TThe type of the item.

Parameters

NameTypeDescription
sourceOptional?The source.
actionActionThe action.

Returns: OptionElse -- The optional else extension.