User Tools

Site Tools


nullable
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


nullable [2018/07/02 03:54] (current) – created wolfgangriedmann
Line 1: Line 1:
 +====== 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:
 +<code>Nullable<T></code>
 +and to be used like this:
 +<code>local dDate as Nullable<DateTime>
 +
 +dDate := null
 +dDate := DateTime.Now</code>
 +
 +Reference types in the .NET Framework don't need ''Nullable'', they already support null values.
 +
 +For more information see [[https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/nullable-types/|docs.microsoft.com/en-us/dotnet/csharp/programming-guide/nullable-types/]]
  
nullable.txt · Last modified: 2018/07/02 03:54 by wolfgangriedmann