Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

remove character from string C#

// our string
string myString = "test@gmail.com";

// 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
  
Comment

c# remove char from string

// How to replace a char in string with an Empty character
string num = "1234-1234-1234-1234";
num = num.Replace("-", " ");
// result: 1234 1234 1234 1234

// How to remove a char in string
string num = "1234-1234-1234-1234";
num = num.Replace("-", string.Empty);
// result: 1234123412341234
Comment

remove control characters from string c#

string input; // this is your input string
string output = new string(input.Where(c => !char.IsControl(c)).ToArray());
Comment

PREVIOUS NEXT
Code Example
Csharp :: matrix transpose c# 
Csharp :: DateTime restrictions 
Csharp :: using statement c# 
Csharp :: camelCase and snakeCase 
Csharp :: triangle 
Csharp :: .net using appsettings variables 
Csharp :: how to lerp a value in unity 
Csharp :: unity set cursor position 
Csharp :: action c# 
Csharp :: access denied tring to save a file uwp xamarin 
Csharp :: concatenation on different lines in f# 
Csharp :: .net core web api save pdf file in local folder 
Csharp :: if exercises c# 
Csharp :: create anchor tag dynamically c# 
Csharp :: c# convert string to base64 string 
Csharp :: avoid writing the name of the type twice 
Csharp :: scale min max to 0 1 
Csharp :: get one parameter from list in an new list c# 
Csharp :: how to hide tree level button when no record found for devexpress child grid view in Winform c# 
Csharp :: c# datagridview select row index programmatically 
Csharp :: loop code for X seconds 
Csharp :: office open xml check if row is empty 
Csharp :: UnityEngine.Mesh:get_vertices() 
Csharp :: crystal report error webconfig reference 
Csharp :: GridViewColumn url wpf 
Csharp :: how download file from internet and move it to folder with c# 
Csharp :: clickable table row asp.net core cursor 
Csharp :: il c# 
Csharp :: two lowest positive numbers given an array of minimum 
Csharp :: c# catch multiple exceptions at once 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =