Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #char #string
ADD COMMENT
Topic
Name
9+3 =