Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,10 @@
// Creates and initializes a new integer Array
int[] intArray = new int[5] { 1, 2, 3, 4, 5 };
//same as
int[] intArray = new int[]{ 1, 2, 3, 4, 5 };
//same as
int[] intArray = { 1, 2, 3, 4, 5 };
//Arrays are zero-based
string[] stringArr = new string[5];
stringArr[0] = "string";

View file

@ -0,0 +1,8 @@
//Create and initialize ArrayList
ArrayList myAl = new ArrayList { "Hello", "World", "!" };
//Create ArrayList and add some values
ArrayList myAL = new ArrayList();
myAL.Add("Hello");
myAL.Add("World");
myAL.Add("!");

View file

@ -0,0 +1,8 @@
//Create and initialize List
List<string> myList = new List<string> { "Hello", "World", "!" };
//Create List and add some values
List<string> myList2 = new List<string>();
myList2.Add("Hello");
myList2.Add("World");
myList2.Add("!");

View file

@ -0,0 +1,7 @@
//Create an initialize Hashtable
Hashtable myHt = new Hashtable() { { "Hello", "World" }, { "Key", "Value" } };
//Create Hashtable and add some Key-Value pairs.
Hashtable myHt2 = new Hashtable();
myHt2.Add("Hello", "World");
myHt2.Add("Key", "Value");

View file

@ -0,0 +1,6 @@
//Create an initialize Dictionary
Dictionary<string, string> dict = new Dictionary<string, string>() { { "Hello", "World" }, { "Key", "Value" } };
//Create Dictionary and add some Key-Value pairs.
Dictionary<string, string> dict2 = new Dictionary<string, string>();
dict2.Add("Hello", "World");
dict2.Add("Key", "Value");