From f53c47684a09d120a0e6a70287aa6dba9eca60ab Mon Sep 17 00:00:00 2001 From: fkDeath Date: Mon, 7 Sep 2026 08:46:42 +0200 Subject: [PATCH] feat: add method to convert user text into character array Add new userTextToAnArray method that converts a string into an array of individual characters using LINQ Select and ToArray. This allows for character-level processing of user input. Also add System.Linq using statement to support LINQ operations. --- Program.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Program.cs b/Program.cs index a57826d..c8d148a 100644 --- a/Program.cs +++ b/Program.cs @@ -8,6 +8,7 @@ /// └─────────────────────────────────────────────────────────────────────────────────────────┘ using System; +using System.Linq; class PI114 { @@ -96,5 +97,12 @@ class PI114 string userText = Console.ReadLine(); Console.WriteLine(); Console.WriteLine(userText); + userTextToAnArray(userText); } + + static void userTextToAnArray(string userText) + { + string[] userTextArray = userText.Select(x => x.ToString()).ToArray(); + } + } \ No newline at end of file