回答編集履歴
5
コメント
test
CHANGED
@@ -26,13 +26,15 @@
|
|
26
26
|
|
27
27
|
|
28
28
|
|
29
|
+
//修正分
|
30
|
+
|
29
31
|
var query_list = from q in list
|
30
32
|
|
31
33
|
orderby q.intNo
|
32
34
|
|
33
35
|
select q;
|
34
36
|
|
35
|
-
|
37
|
+
|
36
38
|
|
37
39
|
var list_orderby = query_list.ToList();
|
38
40
|
|
4
編集
test
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
```ここに言語を入力
|
10
10
|
|
11
|
-
var query = from q in context
|
11
|
+
var query_context = from q in context
|
12
12
|
|
13
13
|
select new {
|
14
14
|
|
@@ -22,11 +22,23 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
-
var list = query.ToList();
|
25
|
+
var list = query_context.ToList();
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
var query_list = from q in list
|
30
|
+
|
31
|
+
orderby q.intNo
|
32
|
+
|
33
|
+
select q;
|
26
34
|
|
27
35
|
|
28
36
|
|
37
|
+
var list_orderby = query_list.ToList();
|
38
|
+
|
39
|
+
|
40
|
+
|
29
|
-
foreach(var i in list)
|
41
|
+
foreach(var i in list_orderby)
|
30
42
|
|
31
43
|
{
|
32
44
|
|
3
編集
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
data2 = q.data2,
|
18
18
|
|
19
|
-
intNo = ParseInt(q.strNo)//PaseIntは
|
19
|
+
intNo = ParseInt(q.strNo)//PaseIntはint.TryParseを使って自作
|
20
20
|
|
21
21
|
};
|
22
22
|
|
2
コード追加
test
CHANGED
@@ -24,4 +24,18 @@
|
|
24
24
|
|
25
25
|
var list = query.ToList();
|
26
26
|
|
27
|
+
|
28
|
+
|
29
|
+
foreach(var i in list)
|
30
|
+
|
31
|
+
{
|
32
|
+
|
33
|
+
Console.WriteLine(i.data1);
|
34
|
+
|
35
|
+
Console.WriteLine(i.data2);
|
36
|
+
|
37
|
+
Console.WriteLine(i.intNo);
|
38
|
+
|
39
|
+
}
|
40
|
+
|
27
41
|
```
|
1
文字ミス
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
data2 = q.data2,
|
18
18
|
|
19
|
-
intNo = ParseInt(q.strNo)
|
19
|
+
intNo = ParseInt(q.strNo)//PaseIntはInt32.TryParseを使って自作
|
20
20
|
|
21
21
|
};
|
22
22
|
|