title image


Smiley Re: Funktions parameter in Hashtable
Also hier eine Bespiel mit Kontruktor:



public class Tester

{

public Tester(string name, int id){}

}



public sealed class Information

{

public static string[] GetParameters(Type t)

{

System.Collections.ArrayList al = new System.Collections.ArrayList();

System.Reflection.ConstructorInfo[] info = t.GetConstructors(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);



foreach (System.Reflection.ConstructorInfo inf in info)

{

System.Reflection.ParameterInfo[] ps = inf.GetParameters();



foreach(System.Reflection.ParameterInfo pi in ps)

al.Add(pi.Name);

}

string[] names = list.ToArray(typeof(string));

return names;

}

}
To know or to know who to ask
Wissen odda Wissen, wen man fragen soll


geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: