Could someone please helpme to understand if the following codes are same. If not what\'s the difference between class and interfance instantiation.
IUnityCo
Interface instantiation is not possible. But when we created an an object for interface using its implemented class it works.
IUnityContainer container = new UnityContainer()// It is assigning an object of its implemented class.
UnityContainer container = new UnityContainer() // To access directly by using like this.
Assume that there is a multiple inheritance, to achieve this we need to go with first.
There is no need to provide such things we go with second way.
Interfaces restricts direct access of the data and members of its class.