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)
Syntax
public static Object? CreateEmpty(
	Type type
)

Parameters

type
Type: SystemType
The type.

Return Value

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