Skip to content

Instantly share code, notes, and snippets.

@xparadoxical
Created May 1, 2022 21:50
Show Gist options
  • Save xparadoxical/ce2a8f8fb452c0ed9d8cfe8e7f06ce18 to your computer and use it in GitHub Desktop.
Save xparadoxical/ce2a8f8fb452c0ed9d8cfe8e7f06ce18 to your computer and use it in GitHub Desktop.
using System;
using System.Linq;
using static System.Reflection.BindingFlags;
Type t = typeof(D);
t.GetMethods(Public | Instance).Where(m => m.Name is "Invoke").ToArray().Inspect("method");
t.GetMethod("Invoke")!.GetParameters().Inspect("parameters");
delegate void D(string s, int i, object o, decimal d);
[method:{ Void Invoke(System.String, Int32, System.Object, System.Decimal) }]
[parameters:{ System.String s, Int32 i, System.Object o, System.Decimal d }]
{
"version": 1,
"target": "Run",
"mode": "Release"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment