prova cosiL'errore stava nel definire 2 volte le string (new string non new string() )codice:using System; using System.Windows.Forms; namespace MyForm { public class CreatedForm : System.Windows.Forms.Form { /* *Dichiarale solo una volta */ private string createdObject3; private string createdObject2; private string createdObject1; private string createdObject0; private System.Windows.Forms.ComboBox comboBox; private System.Windows.Forms.Label label; public CreatedForm() { InitializeComponents(); } void InitializeComponents() { // // Set up generated class form // this.SuspendLayout(); this.Name = "form"; this.Size = new System.Drawing.Size(776, 300); // // Set up member label // label = new System.Windows.Forms.Label(); label.Name = "label"; label.Text = "Scegli il linguaggio"; label.TabIndex = 1; label.Location = new System.Drawing.Point(104, 24); this.Controls.Add(label); // // Set up member comboBox // comboBox = new System.Windows.Forms.ComboBox(); comboBox.Name = "comboBox"; comboBox.TabIndex = 0; comboBox.Location = new System.Drawing.Point(104, 56); comboBox.Size = new System.Drawing.Size(121, 21); comboBox.Text = "Scegli"; // // Set up member createdObject0 // comboBox.Items.Add(createdObject0); // // Set up member createdObject1 // comboBox.Items.Add(createdObject1); // // Set up member createdObject2 // comboBox.Items.Add(createdObject2); // // Set up member createdObject3 // comboBox.Items.Add(createdObject3); this.Controls.Add(comboBox); this.ResumeLayout(false); } }
Ciao:gren:

Rispondi quotando