Find same values in a class list

Hey guys !

I Have a class for my hexagonal tiles map that contains multiples gameobjects (summits of the hexagon) that I use as waypoints.

using UnityEngine;
using System.Collections;

[System.Serializable]
public class HexClass 
{
	public int ID;

	public GameObject N_n;
	public GameObject N_ne;
	public GameObject N_se;
	public GameObject N_s;
	public GameObject N_sw;
	public GameObject N_nw;

	public int T_ne;
	public int T_e;
	public int T_se;
	public int T_sw;
	public int T_w;
	public int T_nw;

	public HexClass (	int id, 
						GameObject n_n, 
						GameObject n_ne, 
						GameObject n_se, 
						GameObject n_s, 
						GameObject n_sw, 
						GameObject n_nw, 
						int t_ne, 
						int t_e, 
						int t_se, 
						int t_sw, 
						int t_w, 
						int t_nw)
	{
		ID = id;
		N_n = n_n;
		N_ne = n_ne;
		N_se = n_se;
		N_s = n_s;
		N_sw = n_sw;
		N_nw = n_nw;

		T_ne = t_ne;
		T_e = t_e;
		T_se = t_se;
		T_sw = t_sw;
		T_w = t_w;
		T_nw = t_nw;
	}
}

I also have a HexClass List where every item represent a tile and as you probably already thought, some of those tiles share same “waypoint” gameobject for different summit.

For example, 1st tile’s north-east, 2nd tile’s north-west and 4th tile’s south waypoint is the same gameObject :

Here comes my problem… With a given waypoint gameobject, how can I find which items of my hexClass list also share it ?

Thanks in advance and scuse my poor english !

So I found a solution which is probably not the best but it works…

It consist on adding the “using System.Linq;” library and do a bunch of List.FindAll for each of my tiles to look if the same gameobject exist and if it does, I store it into another gameobject list…

As I said there’s probably better way to do it and if someone knows one, I’ll be very grateful !