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
Dave
NA
1
0
Interface that implements list
Nov 25 2009 3:34 AM
I have a requirement to keep all interfaces and classes that inherit from that interface in separate libraries/namespaces.
One of my interfaces needs to have a List of type of a second interface:
e.g.
public interface IYearData
{
int Year{...}
int Total{...}
}
public interface IYears
{
List<IYearData> YearsList {...}
}
Now I want classes that implement these interfaces:
public YearData:IYearData
{
public int Year{...}
public int Total{...}
}
public Years:IYears
{
public List<YearData> YearsList{...}
}
But I can't compile this because the class Years doesn't implement the interface, since YearsList should be of type IYearData and not YearData.
Is there any way round this?
We need to ship the interface library to a third party, but NOT our actual classes.
ANY help very gratefully received.
Thx, Dave.
Reply
Answers (
1
)
parser error message come.
Wesite visited counter.