For (int I=1; I & lt; 5; I++)
{
Var name="radioButton" + I;
String n=this. Controls [name] Tag. The ToString ();
If (n=="Number")
{
MessageBox. Show (" 1111 ");
}
This is why an error "System. NullReferenceException" type of untreated exception?
CodePudding user response:
http://www.cnblogs.com/alexis/archive/2010/11/06/1870519.html visual debugged, enclosing Controls [name] Tag this question,
CodePudding user response:
RadioButton one controls the tag is NULL, or no 4 radioButton
CodePudding user response: