System.Reflection.Emit.GenericInstanceKey.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
		public override bool Equals (object obj)
		{
			GenericInstanceKey other = obj as GenericInstanceKey;
			if (other == null)
				return false;
			if (gtd != other.gtd)
				return false;
			for (int i = 0; i < args.Length; ++i) {
				Type a = args [i];
				Type b = other.args [i];
				/*
				We must cannonicalize as much as we can. Using equals means that some resulting types
				won't have the exact same types as the argument ones. 
				For example, flyweight types used array, pointer and byref will should this behavior.
				MCS seens to be resilient to this problem so hopefully this won't show up.   
				*/
				if (a != b && !a.Equals (b))
					return false;
			}
			return true;
		}