ConstructorInfo.cs 978 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // System.Reflection/ConstructorInfo.cs
  3. //
  4. // Author:
  5. // Paolo Molaro ([email protected])
  6. //
  7. // (C) 2001 Ximian, Inc. http://www.ximian.com
  8. //
  9. using System;
  10. using System.Reflection;
  11. using System.Globalization;
  12. using System.Runtime.InteropServices;
  13. namespace System.Reflection {
  14. [Serializable]
  15. [ClassInterface(ClassInterfaceType.AutoDual)]
  16. public abstract class ConstructorInfo : MethodBase {
  17. public static readonly string ConstructorName = ".ctor";
  18. public static readonly string TypeConstructorName = ".cctor";
  19. protected ConstructorInfo() {
  20. }
  21. public override MemberTypes MemberType {
  22. get {return MemberTypes.Constructor;}
  23. }
  24. public object Invoke (object[] parameters)
  25. {
  26. if (parameters == null)
  27. parameters = new object [0];
  28. return Invoke (BindingFlags.CreateInstance, null, parameters, null);
  29. }
  30. public abstract object Invoke (BindingFlags invokeAttr, Binder binder, object[] parameters,
  31. CultureInfo culture);
  32. }
  33. }