private void Step_Click(object sender, EventArgs e) { CardHeroes my = null; CardHeroes enemy = null; foreach (CardHeroes a in EnemyArena) { if (choosenEnemyCard.Index == a.Index) { enemy = a; } } foreach (CardHeroes a in MyArena) { if (choosenCard.Index == a.Index) { my = a; } } client.StepToSend(enemy, my); }