June 19th, 2007, 21:42 PM
VB.Net 1.1 Object Creation
Not really sure if this is the right place to ask this.
Either way Iíll give it a shot.
Is their way to declare a new object using an already defined object?
Dim A as new textbox
Dim B as new classtypeof A
Just curious .
June 26th, 2007, 04:18 AM
Not sure what you're trying to achieve, but can't you just Dim B as new textbox?
But yes, you should be able to interigate the A variable (there should be a property or method IsType or TypeOf etc...)... but you might need a switch or if statements to then create the B variable. Just be careful of scope
--- 0wN3D by 3gG ---
July 10th, 2007, 05:54 AM
What I was trying to do was serialize an object on one end of a socket connection. Then transfer the binary data to another application that would then deserialize the object and recreate the instance of that object straight from the memory stream; without ever having a reference to the original class.
In other words I was trying to bypass using a shared library reference to get the definition of the class. The serialize and deserialize would give me a assembly error if the reference didn't exist.
Basically I wanted to update a class of an object that was already initialized and being used on another system. Kind of a live update; trying to get the most uptime for the application.
After hours and hours of messing around I ended up just creating a shared library and transferring the new DLL file. Using a assembly loader I was able to create the new instances of the class and pass it all the old information and obtain new functionality to the class with out ever having to shut the application down.
Last edited by Lore7460; July 11th, 2007 at 16:46 PM.