質問編集履歴

7

誤字修正

2016/11/04 05:32

投稿

matsujin_
matsujin_

スコア25

test CHANGED
File without changes
test CHANGED
@@ -80,13 +80,15 @@
80
80
 
81
81
 
82
82
 
83
- private void TestMethod(? hoge2) //<-varはエラーになる
83
+ }
84
84
 
85
- {
86
85
 
87
- Console.WriteLine(hoge2.e.pro1); // <-呼び出し元と同じように出力したい
88
86
 
87
+ private void TestMethod(? hoge2) //<-varはエラーになる
88
+
89
- }
89
+ {
90
+
91
+ Console.WriteLine(hoge2.e.pro1); // <-呼び出し元と同じように出力したい
90
92
 
91
93
  }
92
94
 

6

追記修正

2016/11/04 05:31

投稿

matsujin_
matsujin_

スコア25

test CHANGED
File without changes
test CHANGED
@@ -111,3 +111,5 @@
111
111
  ・ビルドすると「エラー CS0656 コンパイラが必要とするメンバー 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create' がありません」と表示されてしまいます。
112
112
 
113
113
  ・.NET Framewaork4.6です。
114
+
115
+ ・VisualStudio2015で開発しています。

5

追記追加

2016/11/04 05:00

投稿

matsujin_
matsujin_

スコア25

test CHANGED
File without changes
test CHANGED
@@ -56,7 +56,7 @@
56
56
 
57
57
 
58
58
 
59
- class ExtendedClass : とある既存のフレームワークの抽象クラス
59
+ class ExtendedClass : とある既存のフレームワークの抽象クラス
60
60
 
61
61
  {
62
62
 
@@ -109,3 +109,5 @@
109
109
  ・情報が不足しておりましたが、とある既存のシステムのWebアプリで前回担当されていた方が作成したフレームワークを使用しております。(担当された方に聞きたいのですが担当された方は・・・)
110
110
 
111
111
  ・ビルドすると「エラー CS0656 コンパイラが必要とするメンバー 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create' がありません」と表示されてしまいます。
112
+
113
+ ・.NET Framewaork4.6です。

4

追記修正

2016/11/04 04:33

投稿

matsujin_
matsujin_

スコア25

test CHANGED
File without changes
test CHANGED
@@ -26,7 +26,7 @@
26
26
 
27
27
  受け渡す前と受け取った後で同じように処理を記述したいと思ってます。
28
28
 
29
-
29
+ ```
30
30
 
31
31
  using System;
32
32
 
@@ -56,31 +56,47 @@
56
56
 
57
57
 
58
58
 
59
- TestClass[] test = { new TestClass(), new TestClass() };
59
+ class ExtendedClass : とある既存のフレームワークの抽象クラス
60
60
 
61
- foreach(var hoge in test.Select((e) => new { e }))
61
+ {
62
62
 
63
- {
63
+ public フレームワークのオーバーライドしたメソッド()
64
64
 
65
- Console.WriteLine(hoge.e.pro1);
65
+ {
66
66
 
67
- Console.WriteLine(hoge.e.pro2);
67
+ TestClass[] test = { new TestClass(), new TestClass() };
68
68
 
69
- TestMethod(hoge);
69
+ foreach(var hoge in test.Select((e) => new { e }))
70
70
 
71
+ {
72
+
73
+ Console.WriteLine(hoge.e.pro1);
74
+
75
+ Console.WriteLine(hoge.e.pro2);
76
+
77
+ TestMethod(hoge);
78
+
71
- }
79
+ }
72
80
 
73
81
 
74
82
 
75
- private void TestMethod(? hoge2) //<-varはエラーになる
83
+ private void TestMethod(? hoge2) //<-varはエラーになる
76
84
 
77
- {
85
+ {
78
86
 
79
- Console.WriteLine(hoge2.e.pro1); // <-呼び出し元と同じように出力したい
87
+ Console.WriteLine(hoge2.e.pro1); // <-呼び出し元と同じように出力したい
88
+
89
+ }
90
+
91
+ }
80
92
 
81
93
  }
82
94
 
83
95
  }
96
+
97
+ ```
98
+
99
+
84
100
 
85
101
  ================================================================
86
102
 
@@ -90,4 +106,6 @@
90
106
 
91
107
  ・コードを詳細にしました。
92
108
 
109
+ ・情報が不足しておりましたが、とある既存のシステムのWebアプリで前回担当されていた方が作成したフレームワークを使用しております。(担当された方に聞きたいのですが担当された方は・・・)
110
+
93
111
  ・ビルドすると「エラー CS0656 コンパイラが必要とするメンバー 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create' がありません」と表示されてしまいます。

3

誤字修正

2016/11/04 04:31

投稿

matsujin_
matsujin_

スコア25

test CHANGED
File without changes
test CHANGED
@@ -42,7 +42,7 @@
42
42
 
43
43
  namespace Testwebapplication
44
44
 
45
-
45
+ {
46
46
 
47
47
  class TestClass
48
48
 

2

追記を追加

2016/11/04 04:22

投稿

matsujin_
matsujin_

スコア25

test CHANGED
File without changes
test CHANGED
@@ -28,42 +28,66 @@
28
28
 
29
29
 
30
30
 
31
- class TestClass
31
+ using System;
32
32
 
33
- {
33
+ using System.Collections.Generic;
34
34
 
35
- public int pro1 = 1;
35
+ using System.Linq;
36
36
 
37
+ using System.Text;
38
+
39
+ using System.Threading.Tasks;
40
+
41
+
42
+
43
+ namespace Testwebapplication
44
+
45
+
46
+
47
+ class TestClass
48
+
49
+ {
50
+
51
+ public int pro1 = 1;
52
+
37
- public int pro2 = 2;
53
+ public int pro2 = 2;
54
+
55
+ }
56
+
57
+
58
+
59
+ TestClass[] test = { new TestClass(), new TestClass() };
60
+
61
+ foreach(var hoge in test.Select((e) => new { e }))
62
+
63
+ {
64
+
65
+ Console.WriteLine(hoge.e.pro1);
66
+
67
+ Console.WriteLine(hoge.e.pro2);
68
+
69
+ TestMethod(hoge);
70
+
71
+ }
72
+
73
+
74
+
75
+ private void TestMethod(? hoge2) //<-varはエラーになる
76
+
77
+ {
78
+
79
+ Console.WriteLine(hoge2.e.pro1); // <-呼び出し元と同じように出力したい
80
+
81
+ }
38
82
 
39
83
  }
40
84
 
41
-
42
-
43
- TestClass[] test = { new TestClass(), new TestClass() };
85
+ ================================================================
44
-
45
- foreach(var hoge in test.Select((e) => new { e }))
46
-
47
- {
48
-
49
- Console.WriteLine(hoge.e.pro1);
50
-
51
- Console.WriteLine(hoge.e.pro2);
52
-
53
- TestMethod(hoge);
54
-
55
- }
56
86
 
57
87
 
58
88
 
59
- private void TestMethod(? hoge2) //<-varはエラーになる
89
+ 追記:
60
90
 
61
- {
91
+ ・コードを詳細にしました。
62
92
 
63
- Console.WriteLine(hoge2.e.pro1); // <-呼び出し元同じように出力
93
+ ・ビルドすると「エラー CS0656 コンパイラが必要とするメンバー 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create' がありません」表示されてます。
64
-
65
- }
66
-
67
-
68
-
69
- ================================================================

1

レイアウトの修正

2016/11/04 04:17

投稿

matsujin_
matsujin_

スコア25

test CHANGED
File without changes
test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
 
18
18
 
19
- ===========================================================================================
19
+ ================================================================
20
20
 
21
21
  C#を始めて1週間ぐらいなのですが、
22
22
 
@@ -66,4 +66,4 @@
66
66
 
67
67
 
68
68
 
69
- ===========================================================================================
69
+ ================================================================