NullableExtensionsMapT, TResult(NullableT, NullableExtensionsStructToClassFuncT, TResult) Method
Applies a mapping function to a value that may be .
Namespace: Ookii.CommonAssembly: Ookii.Common (in Ookii.Common.dll) Version: 1.0.0+7c2900b8a16cd8ae46bdd79d8f105034712c5fa3
public static TResult Map<T, TResult>(
this T? self,
NullableExtensionsStructToClassFunc<T, TResult> map
)
where T : struct, new()
where TResult : class
<ExtensionAttribute>
Public Shared Function Map(Of T As {Structure, New}, TResult As Class) (
self As T?,
map As NullableExtensionsStructToClassFunc(Of T, TResult)
) As TResult
Dim self As T?
Dim map As NullableExtensionsStructToClassFunc(Of T, TResult)
Dim returnValue As TResult
returnValue = self.Map(map)
public:
[ExtensionAttribute]
generic<typename T, typename TResult>
where T : value class, gcnew()
where TResult : ref class
static TResult Map(
Nullable<T> self,
NullableExtensionsStructToClassFunc<T, TResult>^ map
)
- self NullableT
- The value to map. May be .
- map NullableExtensionsStructToClassFuncT, TResult
- The function to apply to the value.
- T
- The type of the value.
- TResult
- The type of the result.
TResult
If
self is not
, the result of applying
map to
self; otherwise,
.
In Visual Basic and C#, you can call this method as an instance method on any object of type
NullableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
The map function is only called if self is not
.