Structure type is value type and class type & interface type is reference type. In this article explains how to verify that the interface is reference type even if it is used in structure( structure is value type)
Whenever we implement the interface in structure and assign the instance of that structure to an interface variable then it becomes reference type, however when we access the structure instance object directly then it is accessed as value type.Below is an example of this scenario.
No comments:
Post a Comment