Add array to ArrayList
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
class Program {
static void Main(string[] args) {
ArrayList baseballTeams = new ArrayList();
baseballTeams.Add("S");
baseballTeams.Add("r");
baseballTeams.Add("F");
string[] myStringArray = new string[2];
myStringArray[0] = "G";
myStringArray[1] = "L";
baseballTeams.AddRange(myStringArray);
foreach (string item in baseballTeams) {
Console.Write(item + "\n");
}
}
}
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
-
-
-
-
-
-
|