usingSystem;usingSystem.Collections.Generic;//header file for the value chain listusingSystem.Linq;usingSystem.Text;usingSystem.Collections;//header file for the value chain listnamespaceconsoleapplication1{classProgram {Static voidMain (string[] args) { int[] Nmbers =New int[5]; string[,] names =New string[5,4]; byte[] scores =New byte[5][]; for(inti =0; I < scores. Length; i++) {Scores[i]=New byte[i +3]; } for(inti =0; I < scores. Length; i++) {Console.WriteLine ("Length of Row{0} is {1}", I, scores[i]. Length); int[] Nmbers2 =New int[5] {1,2,3,4,5 }; string[,] name2 = {{"g","k"}, {"DD","Eee" } }; intA =nmbers2. Length; //console.readline ();} ArrayList Al=NewArrayList ();//Value Chain ListAl. ADD (5); Al. ADD ( -); Al. Remove (5); Al. ADD ("DFDFDFDFDF"); foreach(varAinchal) {Console.WriteLine (a); } Console.WriteLine (al[0]); List<int> intlist =Newlist<int> ();//Value Chain ListIntlist.add ( -);//IncreaseIntlist.addrange (New int[]{501,502});//IncreaseConsole.WriteLine (Intlist.contains ( $));//whether a value existsConsole.WriteLine (Intlist.indexof (501));//find a worthwhile location for the first timeIntlist.remove (501);//DeleteIntlist.insert (1,1001);//InsertHashtable HT=NewHashtable ();//hash table type does not specifyht. ADD (" First","Jike");//Key value valuesHt. ADD ("Second","Xueyuan"); Console.WriteLine (ht[ About]);//There is no one key value returned as nulldictionary<string,string> d =Newdictionary<string,string> ();//type specifies that a strongly typed thread is unsafe. Thread safety is concurrentdictionary multi-dictionaryD.add (" First","Jike"); //is not a key value, an exception is thrownConsole.WriteLine (ht["Second"]); SortedList<int,int> S1 =Newsortedlist<int,int> ();//sort by key value regardless of value size, increment orderS1. ADD (5, the); S1. ADD (2,1025); S1. ADD (4,1055); S1. ADD (6,1015); S1. ADD (7,1005); S1. ADD (Wuyi,1035); S1. ADD ( *,1095); foreach(varSleinchS1) {Console.WriteLine (SLE. Value);//can be a key value and a value } //stack stacks, queue queuesConsole.ReadLine (); } }}
Array, array list ArrayList and list, Dictionary, SortedList, Hashtable