Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 857591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:25:22+00:00 2026-05-15T08:25:22+00:00

What is the bug here? private void LoadUsers(List<long> uids, EventUser.EventUserStatus eventUserStatus, IList<user> chkfriends) {

  • 0

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?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:25:22+00:00Added an answer on May 15, 2026 at 8:25 am

    f.uid is presumably long? – in which case just:

    long l = f.uid.Value;
    

    This assumes that the value of uid isn’t empty. If there might be null ids in the set, then perhaps:

    if(f.uid != null && uids.Contains(f.uid.Value)) {
        // do it!
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to deal with an IE7 bug in my application. Here is
I have this form in my view: <!-- Bug (extra 'i') right here-----------v -->
Cannot find the bug here, think so this whole script is fagged up, still
MDI Bug http://www.dicu.com/pics/bug_mdi.jpg That's what I get when I try to automatically maximize MDI
I found a bug in the Contains statement in Linq (not sure if it
I've had a bug in our software that occurs when I receive a connection
Mending a bug in our SAP BW web application, I need to call two
When receiving a bug report or an it-doesnt-work message one of my initials questions
This is a minor bug (one I'm willing to live with in the interest
Is there any good bug tracker based on .NET which is free?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.