Can you change the value of a variable while debugging a C# application?

Yes, if you are debugging via Visual Studio.NET, just go to Immediate window.

Showing Answers 1 - 10 of 10 Answers

Ajeet

  • May 17th, 2016
 

yes you can!

  Was this answer useful?  Yes

Neha

  • Apr 4th, 2019
 

yes, we can!
The simplest way I prefer is -
1. Hover on the variable you want to edit the value of.
2. It will show a small window with value, right click on it and select Add watch.
3. A new tab will appear with the name and value of the variable. you can edit the value of variable there. Also, we can see changes in variable value throughout the execution.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions