コード例 #1
0
ファイル: Program.cs プロジェクト: tracigitit/CSharp
        static void Main(string[] args)
        {
            Egg        egg = new Egg();         // Incubate is not accessible from egg.
            IHatchable h   = (IHatchable)egg;   // Incubate is accessible from h.

            using (MyPrecious p = new MyPrecious())
            {
                p.MakeMeInvisible();
            }
            // p.Dispose has been called, even
            // if an exception is thrown.
        }
コード例 #2
0
 private void Awake()
 {
     data = MyPrecious.Instance;
 }