C# destructor called, then a method

J

Jose

Hello,

We have a nunit test object. We've set breakpoints on: constructor,
destructor, and a method. Constructor is called once, first.
Destructor is called next. Last, the object's method is called.

How would this happen?
 
J

Jon Skeet [C# MVP]

Jose said:
We have a nunit test object. We've set breakpoints on: constructor,
destructor, and a method. Constructor is called once, first.
Destructor is called next. Last, the object's method is called.

How would this happen?

Hmm... certainly sounds quite odd.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top