Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace remore_characters_from_string
- {
- class Program
- {
- static void Main(string[] args)
- {
- string str = "Something @to ,Write.;';";
- string[] charsToRemove = new string[] { "@", ",", ".", ";", "'" };
- foreach (var c in charsToRemove)
- {
- str = str.Replace(c, string.Empty);
- }
- Console.WriteLine(str);
- }
- }
- }
- // Kết quả: Something to Write
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement