Answer Posted / rajender
private void btnCalculae_Click(object sender,
System.EventArgs e)
{
long number = Convert.ToInt64 (txtNumber.Text);
long factorial = 1;
lblFactorial.Text = factorial.ToString
("n20");
// calculate factorial
while ( number > 0 && number <= 20)
{
factorial *= number;
number++;
} // end while loop
txtNumber.Text = "";
txtNumber.Focus();
}
private void btnExit_Click(object sender,
System.EventArgs e)
{
this.Close();
}
}
}
Is This Answer Correct ? | 10 Yes | 1 No |
Post New Answer View All Answers
What is xor operation?
Can we inherit partial class in c#?
For read-only operation which property you have to designated?
How do you pronounce c#?
Tell us something about static linking and dynamic linking?
What does void do in c#?
What does == mean in c sharp?
Is datetime value type c#?
How to move to a state-related codebase?
What is thread life cycle in c#?
What is inline function in c#?
What is using keyword?
1. Describe page life cycle?
How do you determine whether a string represents a numeric value?
How do I create a new form in c#?