I know this is a very basic question, but forgive me if I did something wrong.
I have a Many-to-Many relationship using <set>
. When I'm debugging the code I can see the data in the "set", but I'm not sure how to display the data.
For example I could use "foreach" for List, but I cannot use foreach with the "ISet".
In My class:
private ISet newsList = new HashedSet();
public ISet NewsList
{
get { return newsList; }
set { newsList = value; }
}
public void AddNews(News item)
{
NewssList.Add(item);
}
Can any provide some code sample how I can deal with this.
Many thanks.
Daoming