Remove() public méthode

Remove the argument object from the indicated collection. Currently it is not considered an error if the object is not found, just nothing happens.
public Remove ( IList keyList, Slice obj ) : void
keyList IList
obj Slice
Résultat void
Exemple #1
0
		/// <summary>
		/// Look for a reusable slice that matches the current path. If found, remove from map and return;
		/// otherwise, return null.
		/// </summary>
		private Slice GetMatchingSlice(ArrayList path, ObjSeqHashMap reuseMap)
		{
			// Review JohnT(RandyR): I don't see how this can really work.
			// The original path (the key) used to set this does not, (and cannot) change,
			// but it is very common for slices to come and go, as they are inserted/deleted,
			// or when the Show hidden control is changed.
			// Those kinds of big changes will produce the input 'path' parm,
			// which has little hope of matching that fixed orginal key, won't it.
			// I can see how it would work when a simple F4 refresh is being done,
			// since the count of slcies should remain the same.

			IList list = reuseMap[(IList)path];
			if (list.Count > 0)
			{
				Slice slice = (Slice)list[0];
				reuseMap.Remove(path, slice);
				return slice;
			}

			return null;
		}