This article describes the method of simply implementing the Chinese format of the day of the week in C#. Share it for your reference, as follows:
1.
Copy the codeThe code is as follows:
("dddd",new ("zh-cn"));
2.
Copy the codeThe code is as follows:
new string[] { "Sunday", "Monday", "Tuesday", "Thursday", "Friday", "Saturday", }[Convert.ToInt16(("D"))];
3.
"Week"+(("d"))
4.
/// <summary> /// Return to date/// </summary> /// <returns></returns> public static string DayOfWeek { get { switch (("D")) { case "0": return "Sunday "; case "1": return "Monday "; case "2": return "Tuesday "; case "3": return "Wednesday "; case "4": return "Thursday "; case "5": return "Friday "; case "6": return "Saturday "; } } }
For more information about C# related content, please check out the topic of this site:Summary of C# form operation skills》、《Tutorial on the usage of common C# controls》、《Summary of WinForm control usage》、《Summary of thread usage techniques for C# programming》、《Summary of C# operation skills》、《Summary of XML file operation skills in C#》、《C# data structure and algorithm tutorial》、《Summary of C# array operation skills"and"Introduction to C# object-oriented programming tutorial》
I hope this article will be helpful to everyone's C# programming.