An unhandled exception of type 'System.StackOverflowException' occurred in loadversionresult.dll

public abstract class result: calculate
    {
public Vesion ResultVesion
        {
            get
            {                
                return this.ResultVesion ;
            }
            set
            {                
                this.ResultVesion  = value;            
}

public abstract class Valuation
    {

private Vesion resultVesion;

public Vesion ResultVesion
        {
            get { return resultVesion ; }
            set { resultVesion  = value; }
        }

}


An unhandled exception of type 'System.StackOverflowException' occurred in loadversionresult.dll

this exception i am getting at get-->in class result-->at property ResultVesion.

Could you please say me how to overcome this error.
kravindraAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Carl TawnSystems and Integration DeveloperCommented:
Well the problem is that the ResultVesion property of your "result" class is returning itself which is causing an infinite loop. I can't really tell from the code you have posted what exactly it should return.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
shadow77Commented:
I agree with Carl.  Perhaps your result class should be defined this way (ie, add resultVesion as a private member and access it through ResultVesion).
public abstract class result: calculate
{

    private Vesion resultVesion;

    public Vesion ResultVesion 
    {
        get { return resultVesion ; }
        set { resultVesion  = value; }
    }
}

Open in new window

0
shadow77Commented:
It appears that the people who responded answered the question.
0
shadow77Commented:
I think that carl_tawn posted a useful answer (http:#31882828) to the question and that he deserves to receive points.
0
Carl TawnSystems and Integration DeveloperCommented:
Thanks shadow77. Although I'd recommend a split between (http:#31882828) and (http:#31887449) since I pointed out the problem, but shadow77 provided a sample fix.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.