In the development process. The handling of arrays and collections is the most worrying. You typically use a for or foreach to handle some operations. Here are some commonly used sets and arrays of operation functions.
First, an example of 2 sets a,b.
list<int> lista = new list<int> {1,2,3,5,7,9};
list<int> Listb = new list<int> {13,4,17,29,2};
Lista.addrange (LISTB); Merge the collection a.b
list<int> result = Lista.union (LISTB). Tolist<int> (); Remove Duplicates
list<int> result = Lista.concat (LISTB). Tolist<int> (); Keep Duplicates
Lista.binarysearch ("1"); Determines whether a value is contained in the collection. If included then return 0
In an example of two arrays
Int[] I=new int[]{1,2};
Int[] J=new int[]{2,3};
list<int> r = new list<int> ();
R.addrange (i);
R.addrange (j);
Int[] C = R.toarray (); Merging arrays
Int[] X=i.union (j). Toarray<int> (); Remove Duplicates
Int[] X=i.concat (j). Toarray<int> (); Keep Duplicates
int n = array.binarysearch (i,3);//Determine if a value is contained in the array. If included then return 0
The above C # for a number of sets and arrays of operation methods (merger, go to weight, judgment) is a small set to share all the content, hope to give you a reference, but also hope that we support cloud habitat community.