}
protected override bool IsValueTypeImpl () {
//Console.WriteLine ("is value type: {0}: {1} ({2}) base: {3}", AssemblyQualifiedName, type_is_subtype_of (this, pmodule.assemblyb.corlib_value_type, false), pmodule.assemblyb.corlib_value_type.AssemblyQualifiedName, BaseType != null?BaseType.AssemblyQualifiedName: "");
- return (type_is_subtype_of (this, pmodule.assemblyb.corlib_value_type, false) || type_is_subtype_of (this, typeof(System.ValueType), false));
-// this != pmodule.assemblyb.corlib_value_type &&
-// this != typeof (System.Enum); /* FIXME: handle a TypeBuilder System.Enum */
+ return ((type_is_subtype_of (this, pmodule.assemblyb.corlib_value_type, false) || type_is_subtype_of (this, typeof(System.ValueType), false)) &&
+ this != pmodule.assemblyb.corlib_value_type &&
+ this != typeof (System.Enum)); /* FIXME: handle a TypeBuilder System.Enum */
/* return type_is_subtype_of (this, typeof(System.ValueType), false) &&
this != typeof(System.ValueType) &&
return ret;
}
- [MonoTODO]
- public static TypeCode GetTypeCode (Type type)
- {
- // FIXME -- this is most likely too simplistic for all cases;
- // e.g. Enums
-
- if (type.IsArray)
- return TypeCode.Object;
-
- Type ust = type.UnderlyingSystemType;
-
- if (ust == typeof (Boolean))
- return TypeCode.Boolean;
- if (ust == typeof (Byte))
- return TypeCode.Byte;
- if (ust == typeof (Char))
- return TypeCode.Char;
- if (ust == typeof (DateTime))
- return TypeCode.DateTime;
- if (ust == typeof (DBNull))
- return TypeCode.DBNull;
- if (ust == typeof (Decimal))
- return TypeCode.Decimal;
- if (ust == typeof (Double))
- return TypeCode.Double;
- if (ust == typeof (Int16))
- return TypeCode.Int16;
- if (ust == typeof (Int32))
- return TypeCode.Int32;
- if (ust == typeof (Int64))
- return TypeCode.Int64;
- if (ust == typeof (SByte))
- return TypeCode.SByte;
- if (ust == typeof (Single))
- return TypeCode.Single;
- if (ust == typeof (String))
- return TypeCode.String;
- if (ust == typeof (UInt16))
- return TypeCode.UInt16;
- if (ust == typeof (UInt32))
- return TypeCode.UInt32;
- if (ust == typeof (UInt64))
- return TypeCode.UInt64;
-
- return TypeCode.Object;
- }
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static TypeCode GetTypeCode (Type type);
[MonoTODO]
public static Type GetTypeFromCLSID (Guid clsid)
public virtual MemberInfo[] GetMember (string name, MemberTypes type,
BindingFlags bindingAttr)
{
- throw new NotSupportedException (); // according to MSDN
+ return FindMembers (type, bindingAttr, FilterName, name);
}
public MemberInfo[] GetMembers()