Say I have an array of strings
string[] my_array = { "XY:1234567;ZW:124", "XY:124252"};
And a user inputs string user_input = "1234567";
how can I remove the entire string from my_array
so after remove XY:1234567;ZQ:124
is removed based on the partial input
my_array = { "XY:124252" };
My first attempt:
string[] my_array = { "XY:12345678;ZW:124", "XY:124252" };
string user_input = "1234567";
if(my_array.Contains(user_input))
Console.WriteLine("Inside");
else
Console.WriteLine("Not Inside");
Outputted Not Inside
My second attempt:
string[] my_array = { "XY:12345678;ZW:124", "XY:124252" };
string user_input = "%1234567%"; // Tried % to do a partial string I think?
if(my_array.Contains(user_input))
Console.WriteLine("Inside");
else
Console.WriteLine("Not Inside");
Outputted Not Inside
Im out of ideas