if (b == true) { // OK: System.DateTime d = System.DateTime.Now; System.Console.WriteLine(d.ToLongDateString()); }