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
shulzan
NA
1
0
foreach and DictionaryBase
Jul 4 2004 5:36 PM
Hi everyone! I derived several strongly typed key-and-value collections from DictionaryBase following the instructions on msdn. Everything works fine until I try using a foreach statement to access all of their members. An InvalidCastException gets thrown on every attempt. Do I have to implement the IEnumerable interface in my custom types even though it is implemented under DictionaryBase? I figured out that I didn't have to since the "Current" property of the Enumerator returned an object and the foreach statement specified the type to which those objects should be cast. Any help would be greatly appreciated. Don't hesitate to request my code if necessary. Thanks!
Reply
Answers (
0
)
IS XML Documentation for public methods .Net Standard?
Can u Help me pleeeeeaaaseeee!!!