I use visual studio and have several numericUpDown elements for which I set the values for (min, max, value and increment). The code constructor continues to turn my simple decimal values into int []. I know that he says: “Do not change the contents of this method using the code editor,” but it’s very useful for me to set the properties here, and I thought I was just “doing things carefully” when I change:
this.numericUpDown1.Increment = new decimal(new int[] { 2, 0, 0, 0});
to
this.numericUpDown1.Increment = new decimal(2);
but alas, it changes it if you touch the control of the visual form designer. I thought maybe there is a flag that will leave it as it is until I want to update it. This is more for ease of reading and navigation, but even if he just left it on the same line, I would be happier.
I found this ( How can I tell Visual Studio not to fill in a field in the designer code? ) Where someone tried to leave it, m not sure if it is applicable in this case.
Feel free to tell me that I should just overcome this and leave it alone!
source share