• 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[]???
1 Solution
Can I just explicitly cast to a String[]?

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

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