Init. & Dekl. | int[] arrIntTest = new int[5]; int[,] arrIntTest = new int[5,10]; int[,,] arrIntTest = new int[5,10,15]; int[] arrIntTest = new int[] { 1,2,3,4,5 }; int[,] arrIntTest = new int[,] { {1,2,3,4,5} , {7,8,9} }; |
Statische vs. Dynamische Methoden | int[] arrIntTest = new int[5]; arrIntTest.CopyTo(arrAnotherOne); // dynamisch Array.Copy(arrIntTest, arrAnotherOne); // statisch, aber dasselbe Array.Clear(arrIntTest,1,4); // Nur noch EIN Element enthalten und Clear nicht dynamisch! |
Schnellsuche | Array.BinarySearch(dDouble, 2.0); // Baumsuche, beim ersten mal unsortiert, danach schneller Array.BinarySearch<double>(dDouble, 2.0); // noch besser, da generisch |