Mega Code Archive

 
Categories / C# / Reflection
 

Searches for the constructors defined for the current Type, using the specified BindingFlags

using System; using System.Reflection; public class t {     public t() {}     static t() {}     public t(int i) {}     public static void Main() {         ConstructorInfo[] p = typeof(t).GetConstructors();         Console.WriteLine(p.Length);         for (int i=0;i<p.Length;i++) {             Console.WriteLine(p[i].IsStatic);         }     } }