H8b Collections (Non-generic) - Opwarmen 3 - ArrayList Element toevoegen met add en insert
Log in om je oplossingen te testen.
using System;
using System.Collections;
namespace Collections
{
public class Program
{
public static void Main(string[] args)
{
//=================================
//Onderstaande code niet aanpassen
//=================================
ArrayList starWarsFilms = new ArrayList() {
"Star Wars Episode I: The Phantom Menace",
"Star Wars Episode II: Attack of the Clones",
"Star Wars Episode III: Revenge of the Sith",
"Star Wars Episode IV: A New Hope",
"Star Wars Episode V: The Empire Strikes Back",
"Star Wars Episode VI: Return Of The Jedi"};
//Schrijf jouw code hieronder
//=================================
//Onderstaande code niet aanpassen
//=================================
PrintMovies(starWarsFilms);
}
public static void PrintMovies(ArrayList films)
{
foreach (string film in films)
{
Console.WriteLine(film);
}
}
}
}
Je kunt zo vaak indienen als je wenst. Er wordt enkel rekening gehouden met je laatst ingediende oplossing.
Log in om je oplossingen te testen.