Monitoring fields in an object

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

Is it possible in C# to monitor the value of fields in an object. I have a field in an object that wrongfully changes value, and it would be a great help if it was possible to set get a break in the execution of the code during debugging every time it changes its value. Is this possible and how

Thanks a lot
J
 
Jesper said:
Is it possible in C# to monitor the value of fields in an object. I
have a field in an object that wrongfully changes value, and it would
be a great help if it was possible to set get a break in the
execution of the code during debugging every time it changes its
value. Is this possible and how?

No. This is one reason to use properties everywhere instead of fields -
you can set a breakpoint in the "setter"...
 

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

Back
Top