Replacing \ with / using String.Replace in C#

The following code will be helpful to replace the special characters.
Remember to use '@' operator to allow C# to recognize them.

using System;
using System.IO;

public class ForgetCode
    public static void Main()
        string str = @"C:\home\level\one";
        string newstr = str.Replace(@"\","/");

        Console.WriteLine("Input: "+str);
        Console.WriteLine("Output: "+newstr);     

Input: C:\home\level\one
Output: C:/home/level/one