Beispiel #1
0
 public static Odinak Instance()
 {
     if (_odinak == null)
     {
         _odinak = new Odinak();
         return(_odinak);
     }
     else
     {
         return(_odinak);
     }
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            Odinak first = Odinak.Instance();


            if (first != null)
            {
                first.D = 25;
                first.Print("first");
            }
            else
            {
                WriteLine("first == null");
            }
        }