list.contains(item)) would return true or false much like does when using lists. Your code is essentially the same because your looking for an object reference. The psuedo codee that I wrote assumes that list.contains(item) would return true or false. It doesn't return a reference to the item. Sorry if that was unclear.
J
Jon Raynor
@Jon Raynor
Posts
-
Straw Poll: Return True or False? -
Straw Poll: Return True or False?How so? Psuedo Code if (list.contains(item)) { bool bOK = list.delete(item); //Do something here we bOK if you want } This would skip delete calls to items that no longer exist. The delete just deletes, it doesn't do a check on existance.
-
Straw Poll: Return True or False?Test for existance first, then attempt delete.