Method Binding C# Help

How a client maps to a method is defined WIth the terms early and late binding.

Late binding means that the method to invoke is looked for during runtime.

.NET uses the System.

Reflection namespace to make this possible .COM uses the IDispatch interface discussed earlier for late binding.

Late binding is possible with dispatch and dual interfaces.

With COM, early binding has two different options.

One way of early binding, also known as vtable
binding, is to use.thevtable directly – this is possible with custom and dual interfaces.

the second option for early binding is also known as ID binding.

Here the dispatch ID is stored inside the client
code, so during runtime only a call to Invoke () is necessary. GetIdsofNames () is called during design time.

With such clients, it is important to remember that the dispatch ID must not be changed.

Posted on October 27, 2015 in Interoperability

Share the Story

Back to Top
Share This