Answers for "how to remove elements from a string c#"

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
2

c# remove word from string

public static string RemoveHTML(string text)
{
    text = text.Replace(" ", " ").Replace("<br>", "\n").Replace("description", "").Replace("INFRA:CORE:", "")
        .Replace("RESERVED", "")
        .Replace(":", "")
        .Replace(";", "")
        .Replace("-0/3/0", "");
        var oRegEx = new System.Text.RegularExpressions.Regex("<[^>]+>");
        return oRegEx.Replace(text, string.Empty);
}
Posted by: Guest on August-25-2020

Code answers related to "how to remove elements from a string c#"

C# Answers by Framework

Browse Popular Code Answers by Language