Engines/FlatRedBallXNA/FlatRedBall/IO/FileManager.cs
/// <summary>
/// Replaces back slashes with forward slashes, but
/// doesn't break network addresses.
/// </summary>
/// <param name="stringToReplace">The string to replace slashes in.</param>
Replaces back slashes with forward slashes, but
doesn't break network addresses.
Replaces back slashes with forward slashes but doesn ' t break network addresses .
static void ReplaceSlashes(ref string stringToReplace)
        {
            bool isNetwork = false;
            if (stringToReplace.StartsWith("\\\\"))
            {
                stringToReplace = stringToReplace.Substring(2);
                isNetwork = true;
            }
            stringToReplace = stringToReplace.Replace("\\", "/");
            if (isNetwork)
            {
                stringToReplace = "\\\\" + stringToReplace;
            }
        }
static void ReplaceSlashes ( ref string stringToReplace ) { bool isNetwork = false ; if ( stringToReplace . StartsWith ( " \\ \\ " ) ) { stringToReplace = stringToReplace . Substring ( 2 ) ; isNetwork = true ; } stringToReplace = stringToReplace . Replace ( " \\ " , " " ) ; if ( isNetwork ) { stringToReplace = " \\ \\ " + stringToReplace ; } }
Replaces back slashes with forward slashes, but
doesn't break network addresses.
Replaces back slashes with forward slashes but doesn ' t break network addresses .
string
ref
stringToReplace
The string to replace slashes in.
The string to replace slashes in .