How do you declare a progress bar as an optional parameter?
Here is the function:
public int Factorial(int number, System.Windows.Forms.Label l, System.Windows.Forms.ProgressBar newprogressbar, int time=0)
{
....
}
The function has four parameters. Only int number
and the label l
should be mandatory.
time
is already optional, but I don't know how to make the new progressbar optional.
The function returns the factorial of a number and it's uses a label to display it.
The progress bar should show the state of the stack and the time should be the speed at which the function works, but these two should be optional.
I have already done the function, but I still need to figure out how to make the progressbar optional.