public void CreateDefaultConstructor() { if (TypeBuilder.IsInterface) { throw new InvalidOperationException("Interfaces cannot have constructors."); } constructors.Add(new ConstructorEmitter(this)); }
public ConstructorEmitter CreateConstructor(params ArgumentReference[] arguments) { if (TypeBuilder.IsInterface) { throw new InvalidOperationException("Interfaces cannot have constructors."); } var member = new ConstructorEmitter(this, arguments); constructors.Add(member); return member; }