What is the bug here?
private void LoadUsers(List<long> uids, EventUser.EventUserStatus eventUserStatus, IList<user> chkfriends)
{
foreach (var f in chkfriends)
{
long l = f.uid; <-- fails
if (uids.Contains(l)) do it!
}
Error 1 Cannot implicitly convert type ‘long?’ to ‘long’. An explicit conversion exists (are you missing a cast?)
f.uidis presumablylong?– in which case just:This assumes that the value of
uidisn’t empty. If there might benullids in the set, then perhaps: