I have some code:
private static st_createInstance createInstance;
private static st_destroyInstance destroyInstance;
private static st_getVersionId getVersionId;
private static st_getVersionString2 getVersionString2;
//...
[UnmanagedFunctionPointer (CallingConvention.StdCall)]
private delegate IntPtr st_createInstance ();
[UnmanagedFunctionPointer (CallingConvention.StdCall)]
private delegate void st_destroyInstance (IntPtr pHandle);
//...
Now how to null all these delegates using reflections? (Idk how to compare Fields with delegate type).
EDIT: I want to null all of them in simple way, like foreach loop. Don't want to specify each field name.