TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
subscribe
NA
9
0
Casting with a Hashtable
Mar 23 2005 7:12 AM
Hi all. I´ve a problem. I´ve a hashTable that contains some objects. This objects aren´t of the same class, have different types. When I get an object: myObject = hashTable ["myKey"]; the type of myObject is "Object". This way I cant invoke myObject´s methods. myObject.sayHello() -> Compile Error! I have to cast myObject to (myClass); myObject = (myClass) hashTable ["myKey"]; but I dont know what is myClass at compiling time. Can I do somethig similar to?: myObject = (myObject.getType()) hashTable ["myKey"]; Sorry, but my english is too poor. And Thanks!!!
Reply
Answers (
2
)
Help me out, I am unable to set the errortext in error Provider.
data Form Wizard