public void AggiungiPersonaggio(Personaggio a) { foreach (Personaggio b in Personaggi) { if (b.Nome == a.Nome) { throw new Exception("Personaggio giĆ esistente"); } } Personaggi.Add(a); }
private void AddPersonaggio(string item) { Personaggi.Add(item); }