"This expression causes side effects and will not be evaluated". How to suppress?

C#Visual Studio-2010Visual Studio

C# Problem Overview


I'm getting this message in watch box.
Actually, my expression doesn't have any side effect, and I need to re-evaluate it automatically each time. How can I achieve that?

C# Solutions


Solution 1 - C#

You can append ,ac to the watch expression to have it automatically refresh the value

> x.ToString(),ac

See http://msdn.microsoft.com/en-us/library/e514eeby.aspx for more information and other format specifiers.

thanks to Scott https://stackoverflow.com/questions/1049995/visual-studio-make-debugger-aware-that-a-function-doesnt-cause-side-effects

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionfithuView Question on Stackoverflow
Solution 1 - C#zproxyView Answer on Stackoverflow