Castle.Facilities.NHibernateIntegration.Util.FieldInfoCollection.IndexOf C# (CSharp) Method

IndexOf() public method

Returns the zero-based index of the first occurrence of the specified FieldInfo in the FieldInfoCollection.
Please refer to ArrayList.IndexOf(object) for details.
public IndexOf ( FieldInfo value ) : int
value FieldInfo /// The object /// to locate in the . /// This argument may be a null reference. ///
return int
		public int IndexOf(FieldInfo value)
		{
			int count = _data.Count;
			FieldInfo[] items = _data.Items;

			if (value == null)
			{
				for (int i = 0; i < count; i++)
				{
					if (items[i] == null)
						return i;
				}

				return -1;
			}

			for (int i = 0; i < count; i++)
			{
				if (value.Equals(items[i]))
					return i;
			}

			return -1;
		}