12.10.5 Injecting raw C# code

Class code injection

TODO: @:classCode

Function code injection

We can use @:functionCode metadata for a method to generate raw C# code inside a method body. It completely replaces any haxe expressions in method body. For example:

@:functionCode("return (v is int);")
function isInt(v:Dynamic):Bool {
    return false;
}

Which will generate:

public virtual bool isInt(object v) {
    return (v is int);
}