Answer Posted / dilip tekedil
public long Factorial(short num)
{
if (num == 1) return (long)1;
return num * Factorial(--num);
}
| Is This Answer Correct ? | 4 Yes | 5 No |
Post New Answer View All Answers
How can we set the class to be inherited, but prevent the method from being over-ridden?
Is enum a class c#?
What is check/uncheck?
what is the syntax to inherit from a class in c#?
How do you clear a list in c#?
Explain the clr triggers?
What is extension method in c# and how to use them?
Why can’t struct be used instead of class for storing entity?
Can you use foreach iteration on arrays in c#?
How many keyword present in C# language ?
Why use a singleton instead of static methods?
How do you pass reference parameters in c#?
what is the difference between .dll and .exe
Why are strings immutable c#?
Why is it efficient to use System.string under System.Text.StringBuilder ?