A cleaner way to automatically call one method after another?

前端 未结 7 1367
北荒
北荒 2021-01-18 02:28

Is it possible to design a method in such a fashion, that it knows it must automatically call a next method in succession upon exiting?

In the following example, I m

7条回答
  •  无人共我
    2021-01-18 03:11

    Sounds like what you want is Aspect Oriented Programming, there are a number of different frameworks to enable you to have stuff "magically" happen after some set of methods have run, have a look here AOP programming in .Net?

提交回复
热议问题