There is a simple console application in which the recursive method is written. In general, it looks like this
namespace somenamespace { class Program { static void Main(string[] args) { Recursive(...) } static void Recursie(...) { } } } Accordingly, the method refers to itself and during its operation I need a variable that would save some value associated with this method. Suppose in one branch of the cycle in the method I increase it, in the other I decrease it and use it during the operation of the method. What to do in this case?
Why if I declare this method without static, does the program require an instance? How to make this copy? If through new Program() , then what will happen to the void Main ?