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

  • Home
  • SEARCH
  • 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 8079961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:16:26+00:00 2026-06-05T16:16:26+00:00

I created a class with properties like this public class Dependencies { public string

  • 0

I created a class with properties like this

public class Dependencies
{
    public string issueID { get; set; }
    public string status { get; set; }
    public int dependencyCheck { get; set; }
}

Now I created a method where i can use these properties.

private static void prepareIssuesList(string IssueKey, string JIRAtoken)
{
    Dependencies dpObj = new Dependencies();
    List<Dependencies> listObj = new List<Dependencies>();
    dpObj.issueID = IssueKey;
    dpObj.status = "open";
    dpObj.dependencyCheck = 0;
    listObj.Add(dpObj);

}

Now my question is, how to change the dependencyCheck property value. The prepareIssuesList() can called for multiple times. So i am adding multiple objects to Dependencies class. At certain point of time i want to change the dependencyCheck property value. How to do this. I think need to use the Linq to C#. ICan any one have any solution for this one?

  • 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-05T16:16:27+00:00Added an answer on June 5, 2026 at 4:16 pm

    I would do something along these lines:

    public class Dependency
    {
         public string IssueId { get; set; }
         public string Status { get; set; }
         public int DependencyCheck { get; set; }
    }
    
    public class DependencyManager
    {
         public DependencyManager()
         {
              this.Dependencies = new List<Dependency>();
         }         
    
         public List<Dependency> Dependencies { get; private set; }
    
         public void AddDependency(string issueId)
         {
             var dep = new Dependency();
             dep.IssueId = issueId;
             dep.Status = "open";
             dep.DependencyCheck = 0;
    
             this.Dependencies.Add(dep);
         }
    
         public void SetDependencyCheck(string issueId, int value)
         {
             var dep = this.FindDependencyByIssueId(issueId);
             dep.DependencyCheck = value;
         }
    
         public Dependency FindDependencyByIssueId(string issueId)
         {
             var dep = this.Dependencies.FirstOrDefault(d => d.IssueId.Equals(issueId));
             if(dep == null) throw new ArgumentException("Dependency not found", "issueId");
             return dep;
         }
    }
    

    Then somewhere in your code you could do:

    var mgr = new DependencyManager();
    mgr.AddDependency("ABC123");
    mgr.AddDependency("ABC456");
    
    //... some other stuff that makes sense
    
    mgr.SetDependecyCheck("ABC123", 42);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a class student with three properties like this public class Student
I have a object structure like this: public class Entity { IList<Relationship> Relationships{get;set;} }
I created a class that's something like this: public class MovieTheaterList { public DateTime
Consider this abstract class public abstract class Foo { public Injectable Prop {get;set;} }
My class is like this, public class Person : DynamicObject { public string Name
I have created a class which holds three classes as properties: public class Feeds
I have created a library class where... public class CircuitLibrary { // Fields, properties,
See the following class public class Parent { private String name; private int age;
I'm serializing to XML my class where one of properties has type List<string>. public
I really like the following template to create properties for class in VS2005 Type

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.