C
C#2y ago
zi_you

✅ create a nullable datetime array

hi all, how do we create a nullable datetime array?
5 Replies
zi_you
zi_youOP2y 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.
zi_you
zi_youOP2y ago
like this ? result.Value = new DateTime?[] { myDateVal }
Akseli
Akseli2y ago
yes
zi_you
zi_youOP2y ago
okay thank you 🙏

Did you find this page helpful?