|
-
Nov 6th, 2003, 08:58 AM
#1
Thread Starter
Fanatic Member
DateTime and default value
I have many classes that contain variables (and properties to access them) of type DateTime. However, when I access these properties in a form, and they are not initialized, the value shows up as 12:00.... I would like to show nothing or the empty string "".
I guess I could compare in the UI saying if myClass.Date = New Date then txtbox.Text() = "". I could also add new properties (or replace the existing ones) that return the date values as strings and do the check in the property.
This seems like alot of work just to get around this default date thing. Has anyone done it differently or have any ideas?
-
Nov 6th, 2003, 10:58 AM
#2
That is just wierdness related to Date types I believe it was the same way in VB6. Just one note you may want to check its value again Date.MinValue so you don't have to create a new instance of Date to check if it has been used yet for not.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|