From 20c497e381764b4c48a7d59f7c6a803af29278d6 Mon Sep 17 00:00:00 2001 From: Rohit pandey <61056082+Rohit484@users.noreply.github.com> Date: Sat, 7 Nov 2020 08:12:23 +0530 Subject: [PATCH] Create c#_new --- c#_new | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 c#_new 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}");