What is the point of Convert.ToDateTime(bool)?
Posted
by Paul Alan Taylor
on Stack Overflow
See other posts from Stack Overflow
or by Paul Alan Taylor
Published on 2010-04-22T09:24:13Z
Indexed on
2010/04/22
9:33 UTC
Read the original article
Hit count: 134
I was doing some type conversion routines last night for a system I am working on. One of the conversions involves turning string values into their DateTime equivalents.
While doing this, I noticed that the Convert.ToDateTime() method had an overload which accepted a boolean parameter.
First question? Under what circumstances could this ever be useful?
I went a little further and tried to execute the method in QuickWatch. Either way ( true or false ), the routine returns an InvalidCastException.
Second question? Why is this method even here?
© Stack Overflow or respective owner