User Tools

Site Tools


nullable

Nullable Datatypes

Contrary to VO, many datatypes in the .NET Framework don't allow null values.

One of the most important ones is the DataTime class, that cannot have a null value, contrarily to VO, where a date variable can contain null_date.

In the .NET Framework there is the Nullable datatype, defined as follows:

Nullable<T>

and to be used like this:

local dDate as Nullable<DateTime>

dDate := null
dDate := DateTime.Now

Reference types in the .NET Framework don't need Nullable, they already support null values.

For more information see docs.microsoft.com/en-us/dotnet/csharp/programming-guide/nullable-types/

nullable.txt · Last modified: 2018/07/02 03:54 by wolfgangriedmann