teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

追記ミスを修正

2019/11/11 09:33

投稿

Aty
Aty

スコア7

title CHANGED
File without changes
body CHANGED
@@ -56,7 +56,7 @@
56
56
  {
57
57
  new Action<int>((int i) =>
58
58
  {
59
- Console.Write(i + "+");
59
+ Console.Write(i);
60
60
  i = 0;
61
61
  })(i);
62
62
  }

3

追記

2019/11/11 09:33

投稿

Aty
Aty

スコア7

title CHANGED
File without changes
body CHANGED
@@ -48,4 +48,16 @@
48
48
  {
49
49
  for(int i = 0; i < executeTimes; i++) method(i);
50
50
  }
51
+ ```
52
+ ---
53
+ 追記:2番目の解法はこの方がシンプルかもしれません。普通は書かないと思いますが...
54
+ ```cs
55
+ for (int i = 0; i< 10; i++)
56
+ {
57
+ new Action<int>((int i) =>
58
+ {
59
+ Console.Write(i + "+");
60
+ i = 0;
61
+ })(i);
62
+ }
51
63
  ```

2

タグの追加

2019/11/11 09:31

投稿

Aty
Aty

スコア7

title CHANGED
File without changes
body CHANGED
File without changes

1

コメントを修正

2019/11/11 07:45

投稿

Aty
Aty

スコア7

title CHANGED
File without changes
body CHANGED
@@ -21,7 +21,7 @@
21
21
  for(intfor i = new intfor(); i < 10; i.Plus())
22
22
  {
23
23
  Console.Write(i);
24
- // i = 0; エラー。int型に暗黙的に変換できない
24
+ // i = 0; エラー。intfor型に暗黙的に変換できない
25
25
  }
26
26
  }
27
27