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 9121683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:55:05+00:00 2026-06-17T05:55:05+00:00

I am novice in writing lambda expressions and I have the next problem: I

  • 0

I am novice in writing lambda expressions and I have the next problem:
I have

List<int> lifeField;
I want to find index of those members, that correspond to next condition:
(((number % (10 * currentMove)) == 1) || ((number % (10 * currentMove)) == 2))
where number is member of List and currentMove is integer - 0,1,2

For example:

if it is first move
currentMove = 0
I search number 1 or 2 
if it is second move 
I search numbers 11,21

……
I want to find how to write this here with lambda…. or in other function

int indexOfLife = Array.FindIndex(lifeField, ?????????);
  • 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-06-17T05:55:06+00:00Added an answer on June 17, 2026 at 5:55 am
    var indexes = lifeField.Select((x,i) => new {Index = i, Element = x})
        .Where(x => 
            ((x.Element % (10 * currentMove)) == 1) || 
            ((x.Element % (10 * currentMove)) == 2))
        .Select(x => x.Index)
        .ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some problem writing postgres functions in C++ while following the guides for
As I'm a novice, I started learning python by writing simple programs using python
SQL novice here. I'm trying to get a list of invoice numbers. There are
Python novice here. I am using python2.7.2 on Windows7. I have installed the PyWin32
I am still a novice in the new stl members.Can anyone point out why
Im a complete novice to the best practices etc of writing in any code.
Novice programmer asking first question on stack-overflow. I am writing an app for mac
First, I am very novice in my knowledge of writing functions and php, so
I find myself writing a lot of code in my views that looks like
Hallo all, I am writing service in internet scenario. I have to implement message

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.