Merge pull request #1898 from alexanderkyte/debugger_variable_reflection
[mono.git] / mcs / class / corlib / System.Reflection.Emit / TypeBuilder.cs
index 9a3404a271fae2a65d532a388bb9164e49808a41..edf6d58852807e250a372202a96240db1ef8aa41 100644 (file)
@@ -914,6 +914,7 @@ namespace System.Reflection.Emit
                /* Needed to keep signature compatibility with MS.NET */
                public override EventInfo[] GetEvents ()
                {
+                       const BindingFlags DefaultBindingFlags = BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance;
                        return GetEvents (DefaultBindingFlags);
                }
 
@@ -1863,19 +1864,6 @@ namespace System.Reflection.Emit
                                return res;
                }
 
-               internal TypeCode GetTypeCodeInternal () {
-                       if (parent == pmodule.assemblyb.corlib_enum_type) {
-                               for (int i = 0; i < num_fields; ++i) {
-                                       FieldBuilder f = fields [i];
-                                       if (!f.IsStatic)
-                                               return Type.GetTypeCode (f.FieldType);
-                               }
-                               throw new InvalidOperationException ("Enum basetype field not defined");
-                       } else {
-                               return Type.GetTypeCodeInternal (this);
-                       }
-               }
-
 
                void _TypeBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
                {