Server.OppositionGroup.IndexOf C# (CSharp) Méthode

IndexOf() public méthode

public IndexOf ( object obj ) : int
obj object
Résultat int
		public int IndexOf( object obj )
		{
			if ( obj == null )
				return -1;

			Type type = obj.GetType();

			for ( int i = 0; i < m_Types.Length; ++i )
			{
				Type[] group = m_Types[i];

				bool contains = false;

				for ( int j = 0; !contains && j < group.Length; ++j )
					contains = group[j].IsAssignableFrom( type );

				if ( contains )
					return i;
			}

			return -1;
		}