Click or drag to resize

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.Essentials
Assembly: 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
)

Parameters

type  Type
The type.

Return Value

Object
The empty value.
Remarks
Useful to initialize boxed nullable fields in data base tables with a not null value.
See Also