Understanding declarative class and instantiating class in .net

While creating an object of any class, the class which is on the left of declaration is called Declarative class and one on the right is called Instantiating class.

Taking an hypothetical example, consider the following class diagram,

Inheritance

Man inheriting from Emotions

 public class Emotions
    {
        public void Laugh()
        {
            Console.WriteLine("Laughing");
        }

        public void Cry()
        {
            Console.WriteLine("Crying");
        }
    }

    public class Man : Emotions
    {
        public void Read()
        {
            Console.WriteLine("Man Reads");
        }

        public void Play()
        {
            Console.WriteLine("Man Plays Cricket");
        }
    }

For the above class when we create object like this,

Emotions e = new Man();

The above object “e” shows following intellisense ,

Void Main

Void Main

e.{will list public functions from Declarative (Emotions) class but will execute from Instantiating (Man) class}

So, in such scenarios (inheritance), when we declare object of base class and instantiate from derived class, objects show public functions, properties and variables of base (declarative) class in intellisense. However if any of those function is overridden, then derived (instantiating) class function is executed.

The above rule does not stand in shadowing. As in shadowing child class shadows the function from base class. So base class is unaware of any such function declaration.  In that scenario base (declarative) class function will be executed.

 

 

Recognizing different faces in you

Different Faces

Different Faces

Every human being have amazing power within themselves. To have in mind a purpose or plan, to direct the mind helps you achieve your goal. Following power helps you achieve it,

Face of creativity:

Creativity is really about innovation and creating something from nothing using the power of your mind. Creativity is in you, whether you believe me or not.

 

Face of kindness:

Any great power that can bring energy and thought into physical form must come out of kindness. This is manifested with the power of positive thinking and an intent to do good. The law of reciprocity can only reward kind intentions.

 

Face of love:

The face of love conquers all. Think of this power of intention as the face of kindness exponentiation with the emotion of love. When you intend for your clients, vendors, employees and investors to grow and couple that with a lack of judgement, hate, anger or resentment — more of what you want or desire  can manifest itself without impediment.

 

Face of beauty:

The face of beauty is truth, honesty and a knowing that what “is” — is exactly as it should be. You can use this power by re-framing any negative thoughts you have towards others and replace them with an appreciate (a thankfulness attitude) towards them.

 

Face of expansion:

This is the law and the power of spirit to help you expand your awareness of what is possible in your life. Be open to the “knowings” that you have always had inside you that have quietly been guiding you. Listen to them. Whatever you think about expands and it is natural to expand. To deny this truth is to deny a part of your purpose here on Earth.

 

Face of unlimited abundance:

The face of unlimited abundance works in the power of intention or attraction. You were probably taught all of your life about limitations and about what is “not possible.” Fortunately, this came from well-meaning people who believed in limitation and not abundance. This law does not require you to be intellectually perfect in order to receive the benefits. Believing in unlimited abundance has no downside, so why not take another look at your life after you answer this question, “What if I could have it all?”

 

Face of receptivity:

The universal laws of intention are open to everyone and without any judgement. Consider the application of this principle is really about believing in yourself and your ability to be open to unlimited possibilities. Banish your doubts. Focus only on your positive intentions towards others and yourself to tap into this energy.

(Inspired by Dr. Wayne Dyer)