public override Type GetInterface (string name, bool ignoreCase)
{
if (name == null)
throw new ArgumentNullException ();
Type[] interfaces = GetInterfaces();
foreach (Type type in interfaces) {
/*We must compare against the generic type definition*/
#if NET_2_0
Type t = type.IsGenericType ? type.GetGenericTypeDefinition () : type;
#else
Type t = type;
#endif
if (String.Compare (t.Name, name, ignoreCase, CultureInfo.InvariantCulture) == 0)
return type;
if (String.Compare (t.FullName, name, ignoreCase, CultureInfo.InvariantCulture) == 0)
return type;
}
return null;
}