Please use Code Tags when pasting code into the forums.
Instead of looking for a name, you could look for the box component:
void OnCollisionEnter2D(Collision2D collision) {
if(collision.gameObject.GetComponent<BoxScript>() != null) {
Destroy(gameObject);
}
}