Click or drag to resize

DefaultValue Class

Helper methods to get the default value for a type when the type is only available at runtime.
Inheritance Hierarchy
SystemObject
  TomsToolbox.CoreDefaultValue

Namespace:  TomsToolbox.Core
Assembly:  TomsToolbox.Core (in TomsToolbox.Core.dll) Version: 1.0.64.0 (1.0.64.0)
Syntax
public static class DefaultValue

The DefaultValue type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCreateDefault
Creates the default value (C#: default(T)) for the specified type, where the type is only known at runtime.
Public methodStatic memberCreateEmpty
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.
Top
See Also