Advertisement
Guest User

ClassesAndObjects 3

a guest
Jan 16th, 2013
495
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. //Write a program that prints to the console
  7. //which day of the week is today. Use System.DateTime.
  8.  
  9.  
  10. namespace _03.PrintDay
  11. {
  12.     class Program
  13.     {
  14.         static void Main(string[] args)
  15.         {
  16.             DateTime today = DateTime.Now;
  17.             Console.WriteLine("Today is {0}", today.DayOfWeek);
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement