我怎样才能在 c# 中没有时间的情况下随机获取月份和年份

how can i get only month number and year randomly without time in c#

如何在 c# 中以“05/23”这个示例格式随机生成一个只有月份和年份的随机日期?

Random rnd = new Random();

int month = rnd.Next(1,12);
int year = rnd.Next(2000,2050);

string date = $"{month:D2}/{year:D2}";