'factorial' is a 'variable' but used as a 'method' [on hold]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


'factorial' is a 'variable' but used as a 'method' [on hold]



so I have a problem, why cant label21 display factorial ?
maybe Im missing something, because Im new to this


public void button3_Click(object sender, EventArgs e)
{
decimal factorial;
factorial = numericUpDown6.Value;
label21.Text = Fact(factorial()); //here`s a problem
}

static decimal Fact(decimal num)
{
if (num == 1)
{
return 1;
}
return num * Fact(num - 1);
}



This question appears to be off-topic. The users who voted to close gave this specific reason:





Duplicate: stackoverflow.com/q/12081031/993547
– Patrick Hofman
46 secs ago




Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived