I am posting because I cannot find good ASP.NET 2.0 examples for this.
I have two lists I want to compare:
List 1:
List<Article> articleResult = new List<Article>();
Article has ID
List 2:
List<TaggedContent> tagResult = new List<TaggedContent>();
TaggedContent has ContentID
I want to find all tags that have a matching Article ID and
return the string TaggedContent.TagName
The return value is a List<string> of TagName.
I am using ASP.NET 2.0 (sorry!).
Can somebody help out? Thanks you.
Well, obviously it would be a bit easier with LINQ, but hey… I would probably write:
In other words, use a dictionary as an intermediate lookup from ID to name. Let me know if any of this is confusing.