How Objects Describe Themselves

Metadata is the key to language interoperation in the .NET framework. In every DLL or executable assembly, there is a complete description of the classes, methods, parameter lists, and class data members it contains. The metadata stored in the assembly enables the object to be used in developer tools such as Visual Studio.NET. This means that your C# objects can be used on a Visual Basic form with ease. Furthermore, the metadata is available at runtime. Other objects can access it to find out about the services your class provides and invoke methods that it exposes. This enables you to use metadata as a simpler replacement for IDispatch.

Get C# and the .NET Framework: The C++ Perspective now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.