Answers for "c# strip all spaces"

C#
0

how to remove all whitespace from a string in c#

using System.Linq;

  ... 

  string source = "abc    t defrn789";
  string result = string.Concat(source.Where(c => !char.IsWhiteSpace(c)));

  Console.WriteLine(result);
Posted by: Guest on December-08-2020

C# Answers by Framework

Browse Popular Code Answers by Language