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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:44:44+00:00 2026-05-23T17:44:44+00:00

So, I got to work on this huge project. And the is this HUGE

  • 0

So, I got to work on this huge project. And the is this HUGE class with hundreds of variables and methods and lots of partial classes.

interface IBusinessReturn
{

    string variableOne { get; set; }
    string variableTwo { get; set; }

    string variableHundred { get; set; }
    //a lot more...
 }

 public partial class BusinessTransaction : IBusinessReturn
{

    private string _variableOne;
    public string variableOne
    {
        get { return variableOne; }
        set { _variableOne= value; }
    }

    private string _variableTwo;
    public string variableTwo
    {
        get { return variableTwo; }
        set { _variableTwo = value; }
    }

    private string _variableHundred;
    public string variableHundred
    {
        get { return variableHundred; }
        set { _variableHundred = value; }
    }

    // And so it goes on till hundreds...
}

And lots of other partials that goes like this:

public partial class BusinessTransaction: IBusinessTransaction238
{
   //Lots of methods
}

The problem is: It is all working except for some new variables I declared. (varOne and Two, in the example above). When I try to set any value to these var I got a StackOverflowException. I’m 100% sure they’re declared just like every other.

This is how i’m calling:

 BusinessTransaction v763 = new BusinessTransaction();

 v763.variableHundred = "Hi"; //working
 v763.variableOne = "Hello"; //StackOverflow HERE.

I just can’t see any reason for why this is happening, and I only hope you can tell me if this have something to do with the huge amount of methods and variables on this class..

  • 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-23T17:44:44+00:00Added an answer on May 23, 2026 at 5:44 pm

    Look at your getter – no underscores for any of them. You’re causing an infinite loop.

    public string variableOne
    {
        get { return variableOne; }
        set { _variableOne= value; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can't work this out... I've got a .change event handler for multiple select boxes.
I'm sorta at a loss to why this doesn't work considering I got it
Alright, I finally got this code to work after hours of toiling: Dim path
Getting friends of friend are pretty easy, I got this which seems to work
At work we've got a roster that's historically been maintained in a huge Excel
I've got a few controllers here at work that contain methods I can use
Ok, this might not be possible, but I've got a class (called CompositeView )
Wow, I just got back a huge project in C# from outsourced developers and
Huge fan of this website, but it's my first post! I've got an array
The problem is like that: a school has got different classes. Each class has

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.