I have several lists in one class. When I add an class/object to a list I want to be able to check if it doesn't exist already in the list. I've done this using a method that checks the particular list individually but would require a method for each list eg
private bool checkShipList (List<Ship> ship, Ship newship)
//check list code
How can I make it so I use only one method for all lists and can pass the new object to it to check. I used List<T> in the method but can't get it right with the second parameter. Thanks for any help.
View Complete Post