Answers for "c# how to remove s, from string"

C#
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
0

C# remove substring

int begin = myString.IndexOf('(');
int end = myString.IndexOf('"');
string altered = myString.Remove(begin + 1, end - begin - 1);
Posted by: Guest on January-27-2022

C# Answers by Framework

Browse Popular Code Answers by Language