What I want to do is change how a C# method executes when it is called, so that I can write something like this:
[Distributed] public DTask Solve
You can replace a method at runtime by using the ICLRPRofiling Interface.
See this blog for more details.