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.
This commit is contained in:
nocode committed 2026-09-07 08:46:42 +02:00
1 parent ddb515f3e5
commit f53c47684a
1 file changed
+8
+8
View File
@@ -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();
}
}