グローバル変数とローカル変数の理解


using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;



namespace ConsoleApplication1

{

    class Program

    {

        static string mm;

        static void Write()

        {

            string mm = " , !";

            Console.WriteLine(" Write() !");

            Console.WriteLine(" {0}",mm);

            Console.WriteLine(" {0}",Program.mm);

        }

        static void Main(string[] args)

        {

            string mm = " , !!! Miain !";

            Program.mm = " ";

            Write();// 

            Console.WriteLine(" Main ");

            Console.WriteLine(" mm={0}",mm);

            Console.WriteLine(" mm = {0}",Program.mm);

            Console.ReadKey();



        }

    }

}