private FieldReference EmitField(int modifiers, TypeReference type, string name, Expression value) { if (_fields == null) { _fields = new Dictionary <string, FieldReference>(); } else if (_fields.ContainsKey(name)) { throw new System.ArgumentException(_handle + " already has a field '" + name + "'"); } FieldReference field = new FieldReference(modifiers, _handle, type, name); _fields[name] = field; _emitter.field(field, value); return(field); }