C
C#2y ago
jin.fuyou

✅ create a nullable datetime array

hi all, how do we create a nullable datetime array?
5 Replies
jin.fuyou
jin.fuyouOP2y 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.
jin.fuyou
jin.fuyouOP2y ago
like this ? result.Value = new DateTime?[] { myDateVal }
Akseli
Akseli2y ago
yes
jin.fuyou
jin.fuyouOP2y ago
okay thank you 🙏
Want results from more Discord servers?
Add your server