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
Conor
NA
3
0
Collection of objects of multiple types which implement an interface.
May 2 2008 4:24 PM
Hi,
I have a problem Im hoping someone can help me with.
Ive a control which extends the asp.net Calendar Control allowing me to display lists of events on the calendar. Currently its datasource is a Datatable.
I have several classes which represent different types of events. The base Class is called CalendarEvent and is exntended by MeetingEvent, ConferenceEvent, InterviewEvent etc.
I have an interface ICalendarEvent which has one method, getDataTable, which return a datatable in the right format for the Extended Calendar control. My Event classes all implement this interface.
I want to create a collection of objects which implement ICalendarEvent. This List should be able to contain objects of type CalendarEvent, MeetingEvent etc.
Is this possible?
Thanks,
Conor
Reply
Answers (
2
)
Dynamic variable names or something else??
Saving text manipulated data