Results 1 to 7 of 7

Thread: [RESOLVED] Overriding Hashtable's Item(KEY) Property

Threaded View

  1. #1

    Thread Starter
    ^:^...ANGEL...^:^ wrack's Avatar
    Join Date
    Mar 2002
    Location
    Melbourne, AUSTRALIA
    Posts
    2,695

    Resolved [RESOLVED] Overriding Hashtable's Item(KEY) Property

    Hi,

    I am using a Hashtable which stores unique names and objects associated with those names.

    Now those objects have a property called "IsDynamic" and some of them have it set to false whie some of them have it set to true.

    So when I retrieve any object using the key property, it goes to find me that object. How do I override that find method?

    Code:
            Dim pTest As Hashtable
    
            pTest = New Hashtable
    
            pTest.Add("Test1", "Blah1")
            pTest.Add("Test2", "Blah2")
            pTest.Add("Test3", "Blah3")
    
            Dim sTest As String
            sTest = pTest("Test2")
    I want to override the method which does this part

    Code:
    pTest("Test2")
    so I can check certain things of the object first and if needed then call a method of that object before giving that object back to the user.

    Hope this makes sense. If any questions then please ask. I am ok to create my object inheriting from Hashtable too.

    Cheers
    Last edited by wrack; Mar 24th, 2010 at 11:35 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
  •  



Click Here to Expand Forum to Full Width