Olası Çoğalt:
How do I use DateTime.TryParse with a Nullable<DateTime>?dönüştürme Dize
Ben bu kod satırı var
DateTime? dt = Condition == true ? (DateTime?)Convert.ToDateTime(stringDate) : null;
bu null DateTime için dize dönüştürmek için doğru yolu var mı veya dönüştürmedendönüştürmek için doğrudan bir yöntem var mı, DateTime'a ve null NULLLible DateTime'a döküm mü?
Null'ı boş bırakılabilir DateTime: 'Koşul == true? Convert.ToDateTime (stringDate): (DateTime?) Null; ':) – Artemix
' DateTime? dt = dt.GetValueOrDefault (DateTime.Now); ' – Jnr