c# convert to nullable datetime

C#
DateTime? lastPostDate =  (DateTime?)(reader.IsDbNull(3) ? null : reader[3]); 
Source

Also in C#: