General information
Title:
Optional DateTime parameter in VB.NET????
I'm trying to write a subroutine with an optional DateTime parameter. Problem is I can't seem to code a default for it. I've tried "= Nothing", "= New DateTime(DateTime.MinValue)", and "= New DateTime(CType(0, Long))". The compiler rejects them all. I would like to default the parameter to Nothing then be able to check it inside the sub with "If MyDateTime is Nothing Then".
Has anybody else run into this?
Thanks.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only