Use DateTime.Today.DayOfWeek.
By the way, for those who have commented to me in the previous questions that this is a class assignment, yes it is true, but since we are beginners in c#, we have the right to search the internet if we ever get stuck. I need answers to learn different methods of how the task is done and and I never thought of just copying them :)

Uday DodiyaRank #239 · 10.3K reputationPosted Oct 21, 2023, 7:09 AM EDT
using System; class Program { static void Main() { // Get the current date and time DateTime currentDateTime = DateTime.Now; // Get the day of the week for the current date and time DayOfWeek dayOfWeek = currentDateTime.DayOfWeek; // Convert the DayOfWeek value to a string for display string dayOfWeekString = dayOfWeek.ToString(); Console.WriteLine($"The current day of the week is: {dayOfWeekString}"); } }