C
C#2y ago
joy

✅ create a nullable datetime array

hi all, how do we create a nullable datetime array?
5 Replies
joy
joy2y ago
i tried to initialize a nullable datetime to a variable that is result.Value = new DateTime[] { myDateVal } but result.Value is a nullable DateTime[] type
hiyosilver
hiyosilver2y ago
Put a ? after the type you want to be nullable.
joy
joy2y ago
like this ? result.Value = new DateTime?[] { myDateVal }
Akseli
Akseli2y ago
yes
joy
joy2y ago
okay thank you 🙏