如何从当年的特定日期找到日期名称?

Pri*_*nka 2 .net c# datetime

我有特定年份的出生日期,我想找到当年出生日期的日期名称.

这该怎么做?

aru*_*nes 5

你可以在今年找到生日吗?

var birthDate = new DateTime(1983, 10, 21);
var thisYear = new DateTime(DateTime.Today.Year, birthDate.Month, birthDate.Day);

var dayOfWeek = thisYear.DayOfWeek; // it gives you day of week of birth day in this year
Run Code Online (Sandbox Code Playgroud)