Duplicated items in watch window ?

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

Guest

Lets say I have following event handler
private void PrintDocument_PrintPage(Object sender, PrintPageEventArgs e)
{
/// some code
}

If I open a watch window on "sender" or on "e", some of the items in watch
window get duplicated, like;
"defaultPageSettings" and "DefaultPageSettings"
or
"DocumentName" and "documentName" , etc;
except the first letter's case they have everything common.
What is the reason to provide the same data 2 times? There must be some...


Please guide.
 
Sachin said:
Lets say I have following event handler
private void PrintDocument_PrintPage(Object sender, PrintPageEventArgs e)
{
/// some code
}

If I open a watch window on "sender" or on "e", some of the items in watch
window get duplicated, like;
"defaultPageSettings" and "DefaultPageSettings"
or
"DocumentName" and "documentName" , etc;
except the first letter's case they have everything common.
What is the reason to provide the same data 2 times? There must be some...

This is mainly an issue with the debugger. It shows both the property and
private field that backs it up. In this case defaultPageSettings is the
field that the property DefaultPageSettings returns.

This feature is invaluable in many circumstances, but it does cause
confusino occasionally as well.
 
Back
Top