예제 #1
0
        public void Test_Name_Ok()
        {
            Weekday     weekday       = Weekday.Tuesday;
            CultureInfo enCultureInfo = CultureInfo.CreateSpecificCulture("en");
            CultureInfo deCultureInfo = CultureInfo.CreateSpecificCulture("de");

            Assert.Equal("Tuesday", weekday.Name(enCultureInfo));
            Assert.Equal("Dienstag", weekday.Name(deCultureInfo));
        }
예제 #2
0
 /// <summary>
 /// The full name of the weekday in the current culture.
 /// </summary>
 /// <param name="weekday"></param>
 /// <returns></returns>
 public static string Name(this Weekday weekday)
 {
     return(weekday.Name(CultureInfo.CurrentCulture));
 }