-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
60 lines (49 loc) · 1.58 KB
/
Program.cs
File metadata and controls
60 lines (49 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using System;
using System.Collections.Generic;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
int myNumber = 1;
Boolean numIsOne = myNumber == 1;
if (numIsOne) {
Console.Write("You have the number 1\n");
}
else {
Console.Write("You don't have hte number 1.....");
}
String myString = "CIS";
int len = myString.Length;
Console.WriteLine(len);
if (myString == "CIS") {
Console.WriteLine("Your string says CIS");
}
else {
Console.WriteLine("Lame: " + myString);
}
// int[] numArr2 = new int[4];
int[] numArr = {1, 4, 7 , 8};
for(int i = 0; i < numArr.Length; i++) {
Console.WriteLine(numArr[i]);
}
List<int> numList = new List<int>();
numList.Add(1);
numList.Add(4);
numList.Add(3);
numList.Add(1);
foreach (var i in numList) {
Console.WriteLine(i);
}
Dictionary<int, String> myDict = new Dictionary<int, string>();
myDict.Add(1, "One");
myDict.Add(2, "Two");
myDict.Add(324352, "Not a real adsjfk;ljddsjfkss");
Console.WriteLine(myDict[324352]);
Animal myAnimal = new Animal("George", 10);
Console.WriteLine(myAnimal);
}
}
}