回答編集履歴
1
推敲
answer
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
> settingクラスでコンボボックスのデータをOKボタンが押されたら保存し、そのデータをformクラスに表示したいです。
|
2
2
|
> また、アプリ起動時にも前回保存されたデータをformクラスに表示したいです。
|
3
3
|
|
4
|
-
ユーザー設定を保存する
|
4
|
+
ユーザー設定を保存する機能は、すでに用意されています。
|
5
5
|
[アプリケーション設定とユーザー設定の使用 - Windows Forms .NET Framework | Microsoft Learn](https://learn.microsoft.com/ja-jp/dotnet/desktop/winforms/advanced/using-application-settings-and-user-settings)
|
6
6
|
[c# properties.settings - Google 検索](https://www.google.co.jp/search?q=c%23+properties.settings)
|
7
7
|
|
8
|
-
アプリ単位で設定を持つので、複数フォームから
|
8
|
+
アプリ単位で設定を持つので、複数フォームから容易にアクセスできます。
|
9
9
|
Visual Studioにデザイナも用意されているので編集も簡単です。
|
10
10
|

|
11
11
|
|
@@ -95,5 +95,5 @@
|
|
95
95
|
`System.Configuration`を参照に追加してください。
|
96
96
|

|
97
97
|
##### .NET(Core)の場合
|
98
|
-
`Properties`フォルダ・`Settings.settings`がデフォルトでは作られないので、プロジェクトのプロパティを開いて
|
98
|
+
`Properties`フォルダ・`Settings.settings`がデフォルトでは作られないので、プロジェクトのプロパティを開いて作成してください。
|
99
99
|

|