考虑下面的OutputToConsole布尔值class。
下面两行代码有什么区别吗?
private static bool OutputToConsole = true;
static bool OutputToConsole = true;
它们似乎都具有相同的功能。
class Debug
{
    private static bool OutputToConsole = true;
    public static void Log(string Type, string URL, StringBuilder Parameters)
    {
        Write(Type + ":" + new string(' ', 9 - Type.Length) + URL + " { " +
            Parameters.ToString() + " }");
    }
    public static void Log(string Data)
    {
        Write("Response: " + Data);
    }
    private static void Write(string Output)
    {
        Trace.WriteLine(Output);
        if(OutputToConsole) Console.WriteLine(Output);
    }
}