So I've go a list which stores Feeds objects which are constructed with a link and a category. Now I want to delete a given Feeds object that has a specific Link and category.
The declaration of my list:
public void addFeed(String link, String cat) {
linkAcategory.Add(new feed(link, cat));
}
The add function:
public void addFeed(String link, String cat) {
linkAcategory.Add(new feed(link, cat));
}
The delete function which is not working but shows what I'm trying to do:
public void removeFeed(String link, String cat) {
linkAcategory.Remove(new feed(link,cat));
}
I hope I get any valuable help here. Thanks in advance.
Assuming that the T object has the link and cat properties:
linkAcategory.RemoveAll(x=>x.link==link && x.cat==cat);
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments