I have a class where inside this class is one private method and many public methods. This private method must be called every time before any other method is called.
The simpliest approach would be calling the method in every method, but I don’t like this approach. Is there any other way to achieve this ?
You might be able to do something here with AOP, perhaps via PostSharp; but unles you are going to do this lots, I’d argue in favor of keeping it simple, and just add the extra code.
Of course, it gets more complex if you need polymorphism and need overrides to still call the method first (probably involving a public non-virtual method and a protected virtual method):