質問編集履歴
2
自環境のコード追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,7 +30,23 @@
|
|
30
30
|
|
31
31
|
|
32
32
|
|
33
|
+
■本の回答
|
33
34
|
|
35
|
+
```C#
|
36
|
+
|
37
|
+
static void PrintList<T>(List<T> list)
|
38
|
+
|
39
|
+
{
|
40
|
+
|
41
|
+
Console.WriteLine(String.Join(",",list.ToArray()));
|
42
|
+
|
43
|
+
}
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
■自環境のコード
|
34
50
|
|
35
51
|
```C#
|
36
52
|
|
@@ -46,18 +62,44 @@
|
|
46
62
|
|
47
63
|
using System.IO;
|
48
64
|
|
49
|
-
|
50
65
|
|
51
66
|
|
52
67
|
|
53
68
|
|
69
|
+
namespace SelfCSharp
|
54
70
|
|
55
|
-
|
71
|
+
{
|
56
72
|
|
73
|
+
class UsingStatic
|
74
|
+
|
57
|
-
|
75
|
+
{
|
76
|
+
|
77
|
+
static void Main(string[] args)
|
78
|
+
|
79
|
+
{
|
80
|
+
|
81
|
+
}
|
82
|
+
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
public class List<T>
|
88
|
+
|
89
|
+
{
|
90
|
+
|
91
|
+
static void PrintList<T>(List<T> list)
|
92
|
+
|
93
|
+
{
|
58
94
|
|
59
95
|
Console.WriteLine(String.Join(",",list.ToArray()));
|
60
96
|
|
61
|
-
|
97
|
+
}
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
}
|
102
|
+
|
103
|
+
}
|
62
104
|
|
63
105
|
```
|
1
インポートしている名前空間を追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,7 +34,25 @@
|
|
34
34
|
|
35
35
|
```C#
|
36
36
|
|
37
|
+
using System;
|
38
|
+
|
39
|
+
using System.Collections.Generic;
|
40
|
+
|
41
|
+
using System.Linq;
|
42
|
+
|
43
|
+
using System.Text;
|
44
|
+
|
45
|
+
using System.Threading.Tasks;
|
46
|
+
|
47
|
+
using System.IO;
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
37
|
-
|
55
|
+
static void PrintList<T>(List<T> list)
|
38
56
|
|
39
57
|
{
|
40
58
|
|