Functions for overwriting IL of .NET methods