How do you click one game Object and then click a matching game object and make them both destroy?

I am trying to build a simple matching game. I would like to use tags and the mouse.
Basically if you click one 3d game object and click another one and they have the same tag I want them both to destroy.
Here is my code so far.

void OnMouseDown(Collider other)
//void OnTriggerEnter(Collider other)
{
    if (other.gameObject.CompareTag(this.gameObject.tag))
        Destroy(other.gameObject);
    Destroy(gameObject);
   // Debug.Log("match");
}

}

you can’t add parameters to the method.

try this:
//created a static variable to hold the clicked object reference
static GameObject selected;

void OnMouseDown(){
    if(selected==null)
         selected=gameObject;
    else{
         if(gameObject.CompareTag(selected.tag)){
             Destroy(selected);
             Destroy(gameObject);
         }
         else
             selected=null;
    }
}