diff --git a/c#_new b/c#_new new file mode 100644 index 0000000..15920b7 --- /dev/null +++ b/c#_new @@ -0,0 +1,15 @@ +int[] numbers = { 4, 8, 15, 16, 23, 42 }; +foreach (int number in numbers) +{ + int total; + total += number; + if (number == 42) + { + bool found = true; + } +} +if (found) +{ + Console.WriteLine("Set contains 42"); +} +Console.WriteLine($"Total: {total}");