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

Re: StackOverflowException when creating a new object by Bob

Bob
Wed Jul 13 07:50:47 CDT 2005

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" <sajeevkumar.sajeev@gmail.com> wrote in message
news:1121248566.848473.12360@f14g2000cwb.googlegroups.com...
> 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
>



Re: StackOverflowException when creating a new object by Jon

Jon
Wed Jul 13 16:14:11 CDT 2005

saje <sajeevkumar.sajeev@gmail.com> wrote:
> 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.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too