StackOverflowException when creating a new object

  • Thread starter Thread starter saje
  • Start date Start date
S

saje

Hi all.
I am creating an apliction dll for my project.
the call lib use a custom class, when i try to create a new object of
the class
it wiill generate a StackOverflowException. i am not using any Recurse
function
in the class.
the exception occures even befor exicuting the objects constructor.
please help me
 
Do you have a property that references itself instead of the property
backing field?

such as:

public int Prop
{
get{return Prop;}
set{Prop=value;}
}

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
saje said:
I am creating an apliction dll for my project.
the call lib use a custom class, when i try to create a new object of
the class it wiill generate a StackOverflowException. i am not using any Recurse
function in the class.
the exception occures even befor exicuting the objects constructor.
please help me

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
 
Back
Top