.using System;
public class MyObj
{
public string Field {get;set;}
public DateTime? MyDate {get;set;}
}
public class Program
public static void Main()
MyObj myObj = new MyObj()
Field = "foo",
MyDate = 1 != 2 ? (DateTime?)DateTime.Now : null;
};
Console.WriteLine("Hello World");