Note that there are some explanatory texts on larger screens.

plurals
  1. POError Using the generic type 'System.Collections.Generic.List' requires '1' type arguments
    primarykey
    data
    text
    <p>I hvae created a code in C# but I had this error :</p> <blockquote> <p>Error 1 Using the generic type 'System.Collections.Generic.List' requires '1' type arguments C:\Users\Abdelhakim\Desktop\Wind Applic C#\Exercice4\Exercice4\Form1.cs 9 34 Exercice4</p> </blockquote> <p>and this is the code I wrote :</p> <pre><code>using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Collections.Generic.List; namespace Exercice4 { public partial class Form1 : Form { List&lt;string&gt; ls = new List&lt;string&gt;(); string p; public Form1() { InitializeComponent(); } private void label2_Click(object sender, EventArgs e) { } private void r1_CheckedChanged(object sender, EventArgs e) { p = "+"; l3.Text = (Convert.ToDouble(t1.Text) + Convert.ToDouble(t2.Text)).ToString(); } private void r2_CheckedChanged(object sender, EventArgs e) { p = "-"; l3.Text = (Convert.ToDouble(t1.Text) - Convert.ToDouble(t2.Text)).ToString(); } private void r3_CheckedChanged(object sender, EventArgs e) { p = "*"; l3.Text = (Convert.ToDouble(t1.Text) * Convert.ToDouble(t2.Text)).ToString(); } private void r4_CheckedChanged(object sender, EventArgs e) { p = "/"; if (Convert.ToDouble(t2.Text) == 0) l3.Text = "Erreur"; else l3.Text = (Convert.ToDouble(t1.Text) / Convert.ToDouble(t2.Text)).ToString(); } private void button1_Click(object sender, EventArgs e) { int i; for (i = 0; i &lt; ls.Count; i++) ls.Items.Add(ls[i]); } private void button2_Click(object sender, EventArgs e) { ls.Add(t1.Text + p + t2.Text + " =" + l3.Text); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload