Is there a way to detect the function pointer type for a field?
The C# 9 compiler accepts the following code:
unsafe class Foo
{
public delegate*<string, int> functionPointer = &GetLength;
static int GetLength(string s) => s.Length;
}
What I've discovered so far using the reflection:
- the field type is
IntPtr - no custom attributes are applied to the field
- no custom modifiers are applied to the field