I have this method with an optional parameter.
public static Test(String connection, Int32 retryInfiniteLoopGuard = 0)
Is there a way to somehow mark the retryInfiniteLoopGuard as private so that it will become invisible when calling the method from outside of the class?
If you wonder why, retryInfiniteLoopGuard is for recursion execution and should not be visible to the users…
Today I use overloading, but is there any other way?
Create a private overload of the method with that parameter and remove the parameter from the public verson. Than make the public version call the private version with the default value:
There is no other way to achieve that goal.