CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Gimme a hash !

  1. #1
    Join Date
    Sep 2001
    Location
    Prague, Czech Republic
    Posts
    43

    Gimme a hash !

    How do you say HASH in VB?

    I need an object that would allow something like

    Obj("foo") = "Hello world"
    If not isEmpty(Obj("foo")) then MsgBox obj("foo")




    The index will always be a string, the value will be either number or a string (I don't mind if the number gets converted to a string.)

    I need the Obj("foo") = "something"

    to work correctly no matter whether the Obj("foo") was set to anything previously and I need the var = Obj("foo")

    to return
    either Empty or "", but again NOT to bomb out when the Obj("foo") was not set.

    Thanks, Jenda

    P.S.: I tried the "Collection" class. It's less than useless.


  2. #2
    Join Date
    Sep 2001
    Location
    Little Rock, Arkansas
    Posts
    40

    Re: Gimme a hash !

    If I understand your post correctly, you're looking for the Dictionary object in the Scripting Runtime. You could probably find some classes that do similar things:

    http://msdn.microsoft.com/scripting/...Dictionary.htm
    http://msdn.microsoft.com/scripting/.../vsproitem.htm

    http://www.planet-source-code.com/xq...s/ShowCode.htm


  3. #3
    Join Date
    Sep 2001
    Location
    Prague, Czech Republic
    Posts
    43

    Re: Gimme a hash !

    Great. Yes this was exactly what I was looking for. :-)

    It's hard to find the right object in those myriads. And its outright impossible to find anything in MSDN.

    Thanks a lot :-)

    Jenda


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

Featured