late-binding

How to access properties dynamically / late-bound?

I'd like to implement a method which allows me to access a property of an unknown/anonymous object (-graph) in a late-bound / dynamic way (I don't even know how to correctly call it). Here's an example of what I'd like to achieve: // setup an anonymous object var a = new { B = new { C = new { I = 33 } } }; // now get the value of a.B....

How do I use .NET type strings in my programs?

For example in a .NET app.config you might get <configuration> <configSections> <section name="MyConfig" type="MyAssembly.MyType, MyAssembly, PublicKeyToken=null" /> </configSections> ... </configuration> The signature in the type part seems to be standardized in a variety of .NET places but I have no idea how to do thi...

Late Binding vs. Polymorphism - what is the difference?

I've seen both used interchangebly but do they really mean the same? From my understanding, Polymorphism stretches the fact that you could exchange an instance of a class by an instance of a subclass, and Late Binding means that when you call a method of an instance, the type decides which method (subclass/superclass) gets called. ...

Release Late-Bound Object in C#

Is there a way to release an object that was accessed using late-binding (i.e. created by the Activator.CreateInstance() method)? I have an application that transforms files from one format to another. The assemblies that perform these translations live in a folder in my application directory. When the application first starts up, I c...

InvokeMember is very slow, anyway to avoid this?

I have to do reflection and late binding so i don't know if there is a way to speed things up. Thought I would give it a shot. This snippet takes about 15 seconds to complete which is way too slow, but seeing how I need to read the metadata. private static object InvokeCall(Type HostObjectType, Object HostObject, CallType callType, st...

Excel VSTO Late-binding deployment problem

I've got an Excel 2007 Workbook that uses mixed VSTO/VBA automation that I'm trying to deploy. Everything was working pretty well, but now I'm running into a stubborn issue with allowing my VBA code to make calls into the VSTO compiled code. I've set up my VBA and code-behind according to the walkthrough posted at http://msdn.microsoft...

Which is the proper way to work with LateBinding in Delphi?

actually i am using late-binding in delphi, and i need to know wich is the proper way to work with it. My principal concern is about how I handle the memory used by these objects, I must free the memory? check this sample code var chEaten: Integer; BindCtx: IBindCtx; Moniker: IMoniker; MyObject:: IDispatch; begin try Ol...