How to add a method to a delegate using reflection?

I need to create a list of objects to render, for these purposes I created the delegate
public delegate void DrawObjects();
 public static DrawObjects DrawList;

As to this delegate add methods with the use of reflection(like this):
DrawList += _GameObject.GetType().GetMethod("DrawCode")...
June 3rd 19 at 19:37
1 answer
June 3rd 19 at 19:39
Solution
in that case, how to convert a delegate in drawObjects? - mario.Runolfsson27 commented on June 3rd 19 at 19:42
You can simply pricestovali on the idea. Only you need to be sure that there really is a method of the signature void (), otherwise it will be the exception. - Joany86 commented on June 3rd 19 at 19:45
, also, if you are working in Unity, read about their limitations on the reflection. There is not all possible to do so. - Joany86 commented on June 3rd 19 at 19:48
Thanks , with unity I have this problem probably arose. - mario.Runolfsson27 commented on June 3rd 19 at 19:51

Find more questions by tags C#OOP