русский
Germany.ruForen → Архив Досок→ Programmierung

Интересная фича... ​

16.05.17 23:04
Re: Интересная фича... ​
 
AlexNek патриот
AlexNek
in Antwort Murr 16.05.17 12:06

Если бы еще кто то исходники правильные приводил с форматированием. Утром "пре" вечером "код"

namespace MurkaX64
{
    public class ATest
    {
        public bool Prop
        {
            get
            {
                return true;
            }
        }
    }
    public class BTest:ATest
    {
        // singleton
        private static BTest instance = null;
        protected static BTest Instance
        {
            get
            {
                if (instance == null)
                {
                    instance= new BTest();
                }
                return instance;
            }
        }
        //static prop
        public new static bool Prop
        {
            get
            {
                return false;
            }
        }
    }
}

Так понятней?

 

Sprung zu