Faced the problem of declaring a constant:
Form1 asx = new Form1(); const string valid = ""; if (asx.method_two.Checked) { valid = "1234567890"; } else { valid = "ADCDEFGHIJKLMOPQRSTUVWXYZ1234567890"; } Faced the problem of declaring a constant:
Form1 asx = new Form1(); const string valid = ""; if (asx.method_two.Checked) { valid = "1234567890"; } else { valid = "ADCDEFGHIJKLMOPQRSTUVWXYZ1234567890"; } So you are trying to change the constant. The constant can only be assigned once (at initialization) and then it cannot be changed. Why do you need a constant at all? Remove const and there will be no problems, especially since you have a variable rather than a constant according to the logic of things.
PS And never again lay out the code picture.
Source: https://ru.stackoverflow.com/questions/516493/
All Articles