Replace multiple spaces with single space

CSharp · Console

/Program.cs

using System;
					
public class Program
{
	public static void Main()
	{
		var s = "This  is  my  double  spaced  string";
		var t = s.Replace("  ", " ");
		Console.WriteLine(t);
	}
}
;