質問編集履歴
2
回答用に画像を追加しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -35,4 +35,54 @@
|
|
35
35
|
### 環境
|
36
36
|
Microsoft Windows 10 Pro (Version 1809)
|
37
37
|
Microsoft Visual Studio Community 2017(Version 15.9.4)
|
38
|
-
Microsoft .NET Framework(Version 4.7.03190)
|
38
|
+
Microsoft .NET Framework(Version 4.7.03190)
|
39
|
+
|
40
|
+
###追加
|
41
|
+
以下のようなクラスライブラリ(.NET Standard)を作り、
|
42
|
+
```C#
|
43
|
+
using System;
|
44
|
+
|
45
|
+
namespace TestLibrary1
|
46
|
+
{
|
47
|
+
public class Animal
|
48
|
+
{
|
49
|
+
public int Aaa()
|
50
|
+
{
|
51
|
+
System.Collections.Generic.List<string> stringList = new System.Collections.Generic.List<string>();
|
52
|
+
stringList.Add("にゃんにゃん");
|
53
|
+
stringList.Add("わんわん");
|
54
|
+
return stringList.Count;
|
55
|
+
}
|
56
|
+
|
57
|
+
}
|
58
|
+
}
|
59
|
+
```
|
60
|
+
|
61
|
+
以下のようなWindowsフォームアプリケーション(.NET Framework)で参照して呼び出す。
|
62
|
+
|
63
|
+
```C#
|
64
|
+
using System;
|
65
|
+
using System.Windows.Forms;
|
66
|
+
|
67
|
+
namespace WindowsFormsApp1
|
68
|
+
{
|
69
|
+
public partial class Form1 : Form
|
70
|
+
{
|
71
|
+
public Form1()
|
72
|
+
{
|
73
|
+
InitializeComponent();
|
74
|
+
}
|
75
|
+
|
76
|
+
private void Form1_Load(object sender, EventArgs e)
|
77
|
+
{
|
78
|
+
//System.Collections.Generic.List<string> stringList = new System.Collections.Generic.List<string>();
|
79
|
+
//stringList.Add("にゃんにゃん");
|
80
|
+
//stringList.Add("わんわん");
|
81
|
+
//MessageBox.Show(stringList.Count.ToString());
|
82
|
+
MessageBox.Show(new TestLibrary1.Animal().Aaa().ToString());
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
```
|
87
|
+

|
88
|
+

|
1
回答用に画像を追加しました。
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|