質問編集履歴

1

修正

2017/05/26 03:41

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -15,3 +15,59 @@
15
15
  リストに上記をAddします。
16
16
 
17
17
  そして、textBoxにaと入力しbuttonを押すとaが含まれている要素をすべてComboBoxに表示させるにはどうすればよいのでしょうか?(小文字、大文字は関係なし)
18
+
19
+
20
+
21
+ ```
22
+
23
+ namespace WindowsFormsApplication3
24
+
25
+ {
26
+
27
+ public partial class Form1 : Form
28
+
29
+ {
30
+
31
+ List<string> list = new List<string>();
32
+
33
+ public Form1()
34
+
35
+ {
36
+
37
+ InitializeComponent();
38
+
39
+ list.Add("A");
40
+
41
+ list.Add("ABC");
42
+
43
+ list.Add("RAND");
44
+
45
+ list.Add("HELLO");
46
+
47
+ }
48
+
49
+
50
+
51
+ private void button1_Click(object sender, EventArgs e)
52
+
53
+ {
54
+
55
+ if (list.Contains(textBox1.Text))
56
+
57
+ {
58
+
59
+ comboBox1.Text =
60
+
61
+ }
62
+
63
+ }
64
+
65
+ }
66
+
67
+ }
68
+
69
+ ```
70
+
71
+
72
+
73
+ =の後がわからないです。