質問編集履歴
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -9,3 +9,55 @@
|
|
9
9
|
2.削除
|
10
10
|
|
11
11
|
したいです。
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
追記
|
16
|
+
|
17
|
+
```c#
|
18
|
+
|
19
|
+
// ロードする方
|
20
|
+
|
21
|
+
public interface IPlugin{
|
22
|
+
|
23
|
+
void Start();//ロード時に読み込まれる
|
24
|
+
|
25
|
+
}
|
26
|
+
|
27
|
+
public class Base{
|
28
|
+
|
29
|
+
public static string ProfilePash = "";
|
30
|
+
|
31
|
+
public static FileStream getFileInProfile(string pash){
|
32
|
+
|
33
|
+
return new FileStream(Base.ProfilePash+pash,FileMode.Open);
|
34
|
+
|
35
|
+
}
|
36
|
+
|
37
|
+
}
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
```c#
|
44
|
+
|
45
|
+
//プラグインの方
|
46
|
+
|
47
|
+
public class Plugin : IPlugin{
|
48
|
+
|
49
|
+
FileStream fs;
|
50
|
+
|
51
|
+
public void Start(){
|
52
|
+
|
53
|
+
fs = new FileStream(Base.ProfilePash+"/examplefile",FileMode.Open);//ここでエラーを返す。
|
54
|
+
|
55
|
+
fs = getFileInProfile("examplefile");//このようにすればエラーが出ない
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
```
|
62
|
+
|
63
|
+
のようにすることはできますか?
|