You have not told us the error you got, but I am pretty sure it is a compile time one, since TryParse is expecting a second
out bound parameter (see:
http://msdn.microsoft.com/en-us/library/ch92fbc1.aspx[
^]).
The difference is there in on the msdn manual page:
Quote:
The DateTime.TryParse(String, DateTime) method is similar to the DateTime.Parse(String) method, except that the TryParse(String, DateTime) method does not throw an exception if the conversion fails.
See this short sample code:
DateTime theDT1;
bool result1 = DateTime.TryParse("2013.01.01", out theDT1);
DateTime theDT2;
bool result2 = DateTime.TryParse("not a date", out theDT2);
DateTime theDT3 = DateTime.Parse("not a date");