Hoe deze functie met reflectie methode aan te roepen, Parameters zijn afgevaardigden en generieken

stemmen
-1
// this is code
    public class Foo1Parent
    {
    }
    public delegate void CallBack<T>(T arg1);
    public delegate void CallBack(); 
    public class Foo
    {
    public void openWindow<T>(CallBack<T> onWindowAwake) where T : Foo1Parent
     {
      Debug.Log(test);
      onWindowAwake(T);
     }
//I use reflection to call methods openWindow
public void openCWindow(CallBack onback, string dialogName)
{
    Type t = Assembly.GetExecutingAssembly().GetType(dialogName);
    MethodInfo meth1 = this.GetType().GetMethod(openWindow);
    object[] obj = new object[] { null }
    meth.Invoke(this, obj );
}
}


//this is my code


//this object[] How do you write it? or has other methods?
De vraag is gesteld op 24/10/2019 om 12:56
bron van user
In andere talen...                            

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more