Remove item from custom list by values

Hi all,
I’m having some difficulties here. I’ve set up a custom list

public class ItemList {

    public string itemName;
    public int typeID;
    public int modification1;

    public ItemList(string newName, int newID, int newMod1)
    {
        itemName = newName;
        typeID = newID;
        modification1 = newMod1;
    }
}

I’m adding items in another script

void Start()
    {
        items.Add(new ItemList("Tiny Test Bag", 20, 4));
        items.Add(new ItemList("Small Test Bag", 20, 8));
        items.Add(new ItemList("Medium Test Bag", 20, 16));
        items.Add(new ItemList("Large Test Bag", 20, 32));
    }

and I’m wanting to remove certain items from that list based on the values rather than index. I’ve looked over the MSDN page on list.remove but the examples don’t work when I convert them to my project.
Any help would be appreciated!

Nevermind, I found a solution.
For anyone that finds themselves in a similar position, here’s how I solved it

ItemList removeItem = new ItemList(nameVariable, typeIDVariable, modification1Variable);
otherObject.items.Remove(removeItem);

Edit: Nope, cancel that. While this doesn’t create any errors, it doesn’t remove items, either.

I’ve got a workaround, but I really don’t like it.

otherScript itemList = object.GetComponent<otherScript>();
for(var i =0; i<itemList.items.Count; i++)
{
  if(itemList.items[i].itemName == itemNameVariable && itemList.items[i].modification1 == modification1Variable && itemList.items[i].typeID == typeIDVariable)
  {
    itemList.items.RemoveAt(i);
    break;
  }
}

If anyone has a better suggestion, I’d love to hear it.

As far as I can recall, you can use Linq inside of Unity

using System.Linq;

//stuff you want
otherObject.RemoveAll(x => x.itemName == "my item" && x.typeID == 2 && x.modification1 == 0);

I’d rather avoid using RemoveAll in case there are multiple items that have the same values. It doesn’t really matter which gets removed, so long as it’s not all of them.

Could also go with something like this
http://stackoverflow.com/a/4379455/2377834

That one worked. I could have sworn I had done that earlier, but it didn’t work. Maybe I wasn’t using Systems.Linq

I decided to continue this thread rather than create a new thread, since it’s of a similar topic
I’m trying to get my list to sync using the UNet syncing, but I can’t seem to figure it out. Is the list I created considered an abstract? Is there a special way to go about getting custom lists to sync?