replace double backslash with single backslash c#

C#
string path = "C:\Hg\temp\\LogFile.txt";
string output = path.Replace(@"\\", @"\"); 

output >>>
C:\Hg\temp\LogFile.txt
Source

Also in C#: