问题
Example C# code (in form load event):
int a = 5;
double b = 7.2;
decimal c = 9.99m;
string d = "test";
MessageBox.Show(a.ToString() + "\n" + b.ToString() + "\n" + c.ToString() + "\n" + d);
Put a breakpoint on the messagebox line and run. Try to edit the values a, b, c and d in a locals window (or autos or watch). The integer, double and string values can be changed, but the decimal value (c) keeps changing back to the original (9.99m). Why is this? Possible bug? Or am I not getting something?
回答1:
This issue was resolved in Visual Studio 2015 Update 2, released March 30, 2016.
来源:https://stackoverflow.com/questions/33265706/cant-edit-decimal-type-value-in-locals-window-vs2015