Reputation: 6821
In visual studio you can edit the value of some fields in the locals window or by hovering over them:
However this doesn't work for replacing a list which is a private field (in this case when I write click on _sectionList the Edit value option is greyed out).
Is there anyway to set the value of a private list field in the visual studio debugger?
In particular I want to replace _sectionList with sectionList2.
Upvotes: 4
Views: 738
Reputation: 29431
You can use the Immediate Window (CtrlAltI) to assign whatever you want to your private fields.
Upvotes: 4
Reputation: 910
You can use the Watch 1
tab and let it evaluate the expression sectionManipulator._sectionList = sectionList2
.
Upvotes: 3