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"...
 
Back
Top