I have to apply a c++ code into c#. the program is meant to calculate the date of easter, but im having 2 errors if anyone can help me figure it out. I'm new to the programming thing. The problem is the line datetextbox.Text = monthOfEaster + dateOfEaster.ToString; it says dateOfEaster and monthOfEaster do not exist in current context.
int year, day;
string month;
year = Int32.Parse (Yeartextbox.Text);
int goldenNum, CenturyNum, DroppedLeapYear, zCorrection,
d, Epact, n;
datetextbox.Text = monthOfEaster + dateOfEaster.ToString;
{
// processing
goldenNum = year % 19 + 1;
CenturyNum = year / 100 + 1;
DroppedLeapYear = 3 *CenturyNum/4 - 12;
zCorrection = (8*CenturyNum+5)/25 - 5;
d = 5*year/4 - DroppedLeapYear - 10;
Epact = ( 11*goldenNum + 20 + zCorrection - DroppedLeapYear) % 30;
if ( Epact == 25 && goldenNum > 11 || Epact == 24 )
Epact = Epact + 1;
n = 44 - Epact;
if ( n < 21 )
n = n + 30;
n = n + 7 - (( d + n ) % 7 );
if ( n > 31 )
{
day = n - 31;
month = "April";
}
else
{
day = n;
month = "March";
}