Search results for query: *

  1. M

    Referencing a property from an object range in a for each within a nested for each

    I've created a list of instances of an object, to give sample data. I've then created a list of IGrouping, containing the objects. Within the foreach, I'm then trying to give an ordering number for the objects within their respective groups (this for each only assigns a value where the value...
  2. M

    LINQ Where one property equals x, return the value of another property

    Thanks John. I had been playing around with Select, but it seems like I had a combination of issues stopping me from getting it working. That's it working now var jobStepNodeCountForJob = JobList.Where(j => j.LevelNumber == ii && j.JobNumberOnLevel == kk).Select(j => j.StepCount);
  3. M

    LINQ Where one property equals x, return the value of another property

    I have a constructor for an object, which I'm trying to query against instantiations of using LINQ. Where one property has a given value, I need to return the value of another property My constructor is as below: public Job(string organisationType, string contractingOrganisationType, int...
  4. M

    Resolved Adding objects with a matching property to a list

    Thanks guys. Linq was a good call, I got there in the end :)
  5. M

    Resolved Adding objects with a matching property to a list

    Thanks John. I don't have any experience using Link. The code is as below if you have a minute to show how an example might look: public class Job { public Guid Record { get; set; } public string JobName { get; set; } public string JobExecutor { get; set; }...
  6. M

    Resolved Adding objects with a matching property to a list

    I have a list of objects, each with various properties, built from a constructor, as below: I am trying to form a list of lists, so that where the 'LevelNumber' matches it will create a list which will be added to a list according to unique 'LevelNumber' ordered by number. I think what's...
Back
Top Bottom