I want to use the DateTime.TryParse method to get the datetime value of a string into a Nullable. But when I try this:
DateTime? d; bool success = DateTime.
Here is a slightly concised edition of what Jason suggested:
DateTime? d; DateTime dt; d = DateTime.TryParse(DateTime.Now.ToString(), out dt)? dt : (DateTime?)null;