Using a recursive function can be very expensive as you’re stack will get larger and larger as you need to store in memory a pointer to the last function on top of the current function.
The other thing that can happen is that using a standard integer in .NET can only hold up to a certain amount of numbers. The below example, handles both scenarios.