Example of Implemeting interface in structure and in class - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Sunday, August 14, 2011

Example of Implemeting interface in structure and in class

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