public void passAmountOfPowers(int a) { Powers.Clear(); for (int i = 0; i < a; i++) { Power p = new Power(); Powers.Add(p); } }
private void SetSuperhero(SuperheroDetailsDTO value) { _superhero = value; Title = _superhero.AlterEgo; Id = _superhero.Id; Name = _superhero.Name; AlterEgo = _superhero.AlterEgo; PortraitUrl = _superhero.PortraitUrl; Occupation = _superhero.Occupation; CityId = _superhero.CityId; CityName = _superhero.CityName; Gender = _superhero.Gender; FirstAppearance = _superhero.FirstAppearance; BackgroundUrl = _superhero.BackgroundUrl; Powers.Clear(); foreach (var power in _superhero.Powers) { Powers.Add(power); } }