DayOfWeek dtt = DateTime.Now.DayOfWeek ; MessageBox.Show(dtt.ToString());
String.Format("{0:dddd}", DateTime.Now);
using System; class Program { class Employee { public DateTime HiringDate { get; set; } } static void Main() { // // Write the current date and time. // DateTime now = DateTime.Now; Console.WriteLine(now); // // Store a DateTime in a class. // Employee employee = new Employee() { HiringDate = now }; Console.WriteLine(employee.HiringDate); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)