| DefaultValueCreateEmpty Method |
Create an empty value that is not null for value types or strings.
- Value type: The empty value is the same as the default value (usually 0).
- String: The empty value is an empty string.
- All other reference types: null.
Namespace: TomsToolbox.EssentialsAssembly: TomsToolbox.Essentials (in TomsToolbox.Essentials.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax public static Object? CreateEmpty(
Type type
)
Public Shared Function CreateEmpty (
type As Type
) As Object
Parameters
- type Type
- The type.
Return Value
ObjectThe empty value.
Remarks
Useful to initialize boxed nullable fields in data base tables with a not null value.
See Also