• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 179
  • Last Modified:

Storing and retrieving arrays in Hashtables

I have a hashtable object that has a key("Event") and a value of type String[].  It seems that the String[] is being stored fine.  I need to know how I can retrieve the value from the Hashtable as a String[] since it is stored as type "Object".  Can I just explicitly cast to a String[]???
0
tblackwe
Asked:
tblackwe
1 Solution
 
jjdunneCommented:
Can I just explicitly cast to a String[]?

Yes.  That is how you get items out of a Hashtable.
0
 
Jan LouwerensSoftware EngineerCommented:
yes, you can just explicitly cast it. For added safety, you can use the instaceof operator...
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now