Intercept method calls
Is there a way of intercepting some method calls without making any code changes around the method itself? I don't need to inject any custom behaviour at runtime, only add custom performance logging to an existing project. You want Aspect Oriented Programming. There are 4 main flavours of AOP Runtime RealProxy based AOP Runtime subclass/virtual method AOP Post Compile IL weave AOP Precompile source code AOP The above are ordered in order of speed of execution (slowest to fastest). Note the last two "should" be the same speed. However I expect the compiler to produce better IL than a Post