回答編集履歴
1
継承先を追記
answer
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
`System.Windows.Form`を継承している親クラスを作って、Form1とForm2に継承させれば良いのでは?
|
1
|
+
`System.Windows.Form`を継承している親クラスを作って、そのclassをForm1とForm2に継承させれば良いのでは?
|
2
2
|
> 継承元
|
3
3
|
```c#
|
4
4
|
using System.Windows.Forms;
|
@@ -10,4 +10,17 @@
|
|
10
10
|
//作りたい処理
|
11
11
|
}
|
12
12
|
}
|
13
|
+
```
|
14
|
+
|
15
|
+
> 継承先
|
16
|
+
```C#
|
17
|
+
|
18
|
+
namespace WindowsFormsApplication1
|
19
|
+
{
|
20
|
+
/// <summary>
|
21
|
+
/// テスト用フォームです
|
22
|
+
/// </summary>
|
23
|
+
public partial class Form1 : baseForm //こんな感じで
|
24
|
+
{
|
25
|
+
…
|
13
26
|
```
|