Question Perhaps a basic programming question

Joined
Jun 2, 2011
Messages
16
Programming Experience
3-5
My name is Jesse, and I am new to these forums. I am completely self taught, so this seems like it may be an elementary question, but any help would be appreciated.

I have written some functions in VB.NET that do things like transfer property values from one object to another, or values from an XML file to an Object's properties, utilizing recursion and reflection.

I initially wrote them utilizing late binding, but in practice, there is no reason. I can just rewrite the Value decelerations to reflect the types I am actually using and compile from there.

But I wonder if there is a way that I can deploy this, without revealing the source code to be rewritten. Just using the algorithms in the functions and allowing another programmer to use his/her own types.

I would call this a template or something, and it seems like such an obvious thing to be able to do, but I do not know what it is called or how it would be implemented in VS or VB.NET.

In case I am not being clear, her is a psuedo code example:

Public Sub PopulateObjectFromObject(ObjF as Object, ObjM as Object)
For Each Property in ObjM
Property.Value = ObjF.Property.Value
Next
End Sub

I want to be able to compile the algorithm, but let someone else use their own objects and strongly type them before runtime.

Any help would be appreciated.
 
Back
Top