System.MonoType.GetInterface C# (CSharp) Method

GetInterface() public method

public GetInterface ( string name, bool ignoreCase ) : Type
name string
ignoreCase bool
return Type
		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;
		}