Click here to Skip to main content
15,890,741 members
Home / Discussions / C#
   

C#

 
GeneralRe: Looking for a book on C# forms Pin
Brian_TheLion25-Aug-20 21:35
Brian_TheLion25-Aug-20 21:35 
GeneralRe: Looking for a book on C# forms Pin
Richard MacCutchan25-Aug-20 22:25
mveRichard MacCutchan25-Aug-20 22:25 
AnswerRe: Looking for a book on C# forms Pin
OriginalGriff25-Aug-20 21:37
mveOriginalGriff25-Aug-20 21:37 
GeneralRe: Looking for a book on C# forms Pin
trønderen26-Aug-20 1:11
trønderen26-Aug-20 1:11 
GeneralRe: Looking for a book on C# forms Pin
OriginalGriff26-Aug-20 1:16
mveOriginalGriff26-Aug-20 1:16 
GeneralRe: Looking for a book on C# forms Pin
trønderen26-Aug-20 5:00
trønderen26-Aug-20 5:00 
AnswerRe: Looking for a book on C# forms Pin
trønderen26-Aug-20 0:38
trønderen26-Aug-20 0:38 
AnswerRe: Looking for a book on C# forms Pin
CHill6026-Aug-20 1:24
mveCHill6026-Aug-20 1:24 
AnswerRe: Looking for a book on C# forms Pin
Ron Nicholson26-Aug-20 2:24
professionalRon Nicholson26-Aug-20 2:24 
AnswerRe: Looking for a book on C# forms Pin
Gerry Schmitz26-Aug-20 7:16
mveGerry Schmitz26-Aug-20 7:16 
QuestionTrying to get my block program working Pin
Brian_TheLion23-Aug-20 16:56
Brian_TheLion23-Aug-20 16:56 
AnswerRe: Trying to get my block program working Pin
Gerry Schmitz23-Aug-20 17:18
mveGerry Schmitz23-Aug-20 17:18 
QuestionHow to calculate in c# the possibility of this game Pin
Exoskeletor22-Aug-20 21:43
Exoskeletor22-Aug-20 21:43 
AnswerRe: How to calculate in c# the possibility of this game Pin
OriginalGriff22-Aug-20 21:47
mveOriginalGriff22-Aug-20 21:47 
GeneralRe: How to calculate in c# the possibility of this game Pin
Exoskeletor22-Aug-20 21:51
Exoskeletor22-Aug-20 21:51 
GeneralRe: How to calculate in c# the possibility of this game Pin
OriginalGriff22-Aug-20 22:01
mveOriginalGriff22-Aug-20 22:01 
GeneralRe: How to calculate in c# the possibility of this game Pin
Exoskeletor22-Aug-20 22:04
Exoskeletor22-Aug-20 22:04 
GeneralRe: How to calculate in c# the possibility of this game Pin
OriginalGriff22-Aug-20 22:13
mveOriginalGriff22-Aug-20 22:13 
GeneralRe: How to calculate in c# the possibility of this game Pin
Exoskeletor22-Aug-20 22:31
Exoskeletor22-Aug-20 22:31 
GeneralRe: How to calculate in c# the possibility of this game Pin
Exoskeletor22-Aug-20 22:32
Exoskeletor22-Aug-20 22:32 
GeneralRe: How to calculate in c# the possibility of this game Pin
OriginalGriff22-Aug-20 22:33
mveOriginalGriff22-Aug-20 22:33 
GeneralRe: How to calculate in c# the possibility of this game Pin
Exoskeletor22-Aug-20 22:37
Exoskeletor22-Aug-20 22:37 
GeneralRe: How to calculate in c# the possibility of this game Pin
OriginalGriff22-Aug-20 22:43
mveOriginalGriff22-Aug-20 22:43 
GeneralRe: How to calculate in c# the possibility of this game Pin
Exoskeletor22-Aug-20 22:57
Exoskeletor22-Aug-20 22:57 
GeneralRe: How to calculate in c# the possibility of this game Pin
OriginalGriff22-Aug-20 23:05
mveOriginalGriff22-Aug-20 23:05 
That's because C# doesn't contain a factorial function - but it's trivial to create one yourself, it's one of the first exercise beginners are often given. Recursive or iterative, it's simple either way:
C#
private static int FactorialRecursive(int x)
    {
    return (x > 1 ? x * FactorialRecursive(x - 1) : 1);
    }
private static int FactorialIterative(int x)
    {
    int f = 1;
    while (x > 1)
        {
        f *= x--;
        }
    return f;
    }
So why couldn't you just write those? Or google for them?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.