From bba0cec7f8afbbbe8430c55ea1c2377d2aefeb5b Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Fri, 29 Nov 2024 12:20:19 +0100 Subject: [PATCH] Just testing some types --- Emne 3/EssentialCsharp/EssentialCsharp/Program.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Emne 3/EssentialCsharp/EssentialCsharp/Program.cs b/Emne 3/EssentialCsharp/EssentialCsharp/Program.cs index 220487d..a817f7d 100644 --- a/Emne 3/EssentialCsharp/EssentialCsharp/Program.cs +++ b/Emne 3/EssentialCsharp/EssentialCsharp/Program.cs @@ -4,10 +4,13 @@ { public static void Main(string[] args) { - string name; - Console.WriteLine("Enter Your name: "); - name = Console.ReadLine(); - Console.WriteLine($"Hello {name}!"); + bool ignoreCase = true; + string option = "/help"; + + int comparison = string.Compare(option, "/Help", ignoreCase); + bool isHelpREquested = (comparison == 0); + Console.WriteLine($"Help Requested: {isHelpREquested}"); + Console.WriteLine("\u0029"); } } } \ No newline at end of file