c# - Is there any way to call method recurrently in symbolic general way? -


Consider two recurring methods, late hours, complex code In essence, these two functions look like this:

  void foo (int x) {... foo (x); } Zero times (int x) {... foo (x); Many times I want to (and I still want) to make some symbolic calls like "Self", so I would like to write it like this / ops, I mean "bar"}   

:

  zero foo (int x) {... self (x); } Zero times (int x) {... self (x); // great! This is what I mean -> & gt; So far, the only thing I can think of is that the normal task is to type "self" which is on the call check stack, get a caller, and call it. However, it will not be possible to use it with heritage:  
  unattended legacy (int x) {base.self (x); }   

Many thanks for your comments / ideas / etc: -)

Pay more attention while writing code? I do not quite understand why you want it, but I'm probably missing something. In essence, I do not think you can do it without reflection and at that time it will be redundant.

Comments