Answers for "remove character from string array c#"

C#
1

remove element from sting array c#

string[] array = new string[] { "1", "2", "3", "4", "5", "6", "7" };

List<string> list = new List<string>(array);

//you can sort List<string>!
list.Sort();

list.Remove("4");//remove specieifed item.
list.RemoveAt(2);//remove item from index.
list.RemoveRange(1, 2);//remove a range of items.
Posted by: Guest on December-04-2021
3

remove character from string C#

// our string
string myString = "[email protected]";

// lets remove the @ symbol
// here we replace our "@" in our string to an empty string 
string newString = myString.Replace("@", string.empty);
 
Console.Writeline(newString);
// output should look like this: testgmail.com
Posted by: Guest on August-17-2021

Code answers related to "remove character from string array c#"

C# Answers by Framework

Browse Popular Code Answers by Language