Get the name of the first day of the week in C#

The System.Globalization namespace's CultureInfo.CurrentCulture.DateTimeFormat.DayNames value is an array holding the names of the days of the week for the computer's locale. The first entry gives the name of the first day of the week.

lblResult.Text = "The first day of the week is " +
CultureInfo.CurrentCulture.DateTimeFormat.DayNames[0];

  

 

What did you think of this article?




Trackbacks
  • No trackbacks exist for this post.
Comments
  • No comments exist for this post.
Leave a comment

Submitted comments are subject to moderation before being displayed.

 Name

 Email (will not be published)

 Website

Your comment is 0 characters limited to 3000 characters.