我在一个类中写了一些委托函数,如下所示
public Func<string, DateTime> toGeorgianDate = persianDatestr =>
{
string[] persianDateParts = persianDatestr.Split(new char[] { '/', ':', ' ' });
int persianYear = int.Parse(persianDateParts[0]);
int persianMonth = int.Parse(persianDateParts[1]);
int persianDay = int.Parse(persianDateParts[2]);
int persianHour = int.Parse(persianDateParts[3]);
int persianMinute = int.Parse(persianDateParts[4]);
int persianSecond = int.Parse(persianDateParts[5]);
PersianCalendar pc = new PersianCalendar();
DateTime GeorgianDate = new DateTime(persianYear, persianMonth, persianDay,persianHour,persianMinute,persianSecond,pc);
return GeorgianDate;
};
我想在下面的函数中调用GeorgianDate,我怎么称它为?
public Func<DateTime, int> PersianYear = GeorgianDateTime =>
{
return ;
};