Is there a way to redefine a function definition/method in C#?
Situation:
Modding someone else's code, and they have:
namespace TheirCode
{
public static class SomeUtility
{
public static void A(this Thing thing)
{
//do something I want to change
}
}
}
I can load another dll that will allow me to insert my own code...but I want to change the behavior of a_thing.A();
I need the changes to affect all Thing
s, not just any derived NewThing
s I might create.
Can I rewrite the method definition somehow? Can I change the behavior another way?
Thanks