Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
C# Program to get current day of week
Use DateTime. DayOfWeek property to display the current day of week.
DayOfWeek wk = DateTime.Today.DayOfWeek;
Now, displaying “wk” would give you the current day of the week.
Let us see the complete code to get the current day of week.
Example
using System;
using System.Linq;
public class Demo {
public static void Main() {
DayOfWeek wk = DateTime.Today.DayOfWeek;
Console.WriteLine(wk);
}
}
Output
Wednesday
Advertisements
