Results 1 to 3 of 3

Thread: VB.Net 1.1 Object Creation

  1. #1
    Junior Member
    Join Date
    Jun 2007

    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 .

  2. #2
    Security Intelligence TZ Veteran cash_site's Avatar
    Join Date
    Jul 2002
    Software Paradise
    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 ---

  3. #3
    Junior Member
    Join Date
    Jun 2007
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts