Hello again,
I've come up with a problem that I have tried to solve myself and through asking on StackExchange,
I am trying to compare the list of friends against the list of followers and display the difference, in this case the people who are you following but aren't following you using :
The User class needs to implement IEquatable, because it's seeing the objects returned as the all different objects so it's returning them all.
My question is does Tweetinvi already do this and I'm just being dense again or will I need to (learn to) override the User class from the library and implement IEquatable?
Thank you for reading, I appreciate any help being a self/Internet Based taught person.
I've come up with a problem that I have tried to solve myself and through asking on StackExchange,
I am trying to compare the list of friends against the list of followers and display the difference, in this case the people who are you following but aren't following you using :
var friends = user.GetFriends(500).ToList();
var following = user.GetFollowers(500).ToList();
var result = compareFollowingtoFollowers(friends, following);
foreach(var res in result)
{
lstFollowerChecker.Items.Add(res);
}
private List<T> compareFollowingtoFollowers<T>(List<T> friends, List<T> followers)
{
var results = friends.Except(followers).ToList();
return results;
}
From what has been explained to me from the StackExchange questionThe User class needs to implement IEquatable, because it's seeing the objects returned as the all different objects so it's returning them all.
My question is does Tweetinvi already do this and I'm just being dense again or will I need to (learn to) override the User class from the library and implement IEquatable?
Thank you for reading, I appreciate any help being a self/Internet Based taught person.