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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:34:25+00:00 2026-06-15T05:34:25+00:00

Say if I have a collection of objects called MyObjects. Now I am looping

  • 0

Say if I have a collection of objects called MyObjects.

Now I am looping on the above collection and adding it to another object called MyObject2. MyObjects has a property called ‘files’.

I want to manipulate the value of files property when I am looping around my first collection. first of all can I do as code shown below. If yes, I get an error as follow :

{Cannot evaluate expression because the current thread is in a stack overflow state.} 

List<objects> MyObjects = Populate(); 
List<objects> MyObject2 = new List<objects>();
foreach(var item in MyObjects)
{
   item.files = "test file" + item.files;
   MyObject2.add(item);
}

edit ::

files property:

 [Transient]
        protected string _files;
        public string files
        {
            get
            {
               return _files;
            }
            set
            {
                _files= value;
            }
        }
  • 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-15T05:34:26+00:00Added an answer on June 15, 2026 at 5:34 am

    Psychic debugging – I suspect your files property looks something like this:

    public string files
    {
        get { return files; }
        set { files = value; }
    }
    

    That will just recurse forever until the stack blows up. That’s just guesswork though, as you haven’t shown us the crucial piece of code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have an object that has a string property called Status. I have a
Let's say I have a collection of objects of different classes. Each class has
Let's say I have a collection of objects which can be sorted using a
Let's say we have a collection of Person objects class Person { public string
Let's say I have a collection of Person objects, each of which looks like
Say I have an entity called Request that has collections of child entities like
I have a MongoDB Collection called Questions which holds JSON Objects that look like
Let's say I have a property: public Collection<T> GameCollection { get { return new
Lets say I have collection of documents with specified longitude and latitude. type is
Say I have a collection of bytes var bytes = new byte[] {0, 1,

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.