NullableExtensionsConvertToNonNullableT Method

Converts an Array of Nullable values to an Array of non-nullable values of the same Type.

Definition

Namespace: DevCase.Extensions.NullableExtensions
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static T[] ConvertToNonNullable<T>(
	this T?[] source,
	T defaultIfNull = null
)
where T : struct, new()

Parameters

source  NullableT
The source Nullable value.
defaultIfNull  T  (Optional)
The default value to use if Nullable value is null ().

Default value is .

Type Parameters

T
The type of the source Nullable value.

Return Value

T
The resulting Array of non-nullable values.

Usage Note

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).

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also