質問編集履歴
2
ファイル読み込みの変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,10 +8,10 @@
|
|
8
8
|
|
9
9
|
###該当のソースコード
|
10
10
|
```C#
|
11
|
-
String
|
11
|
+
String f = System.Windows.Forms.Application.StartupPath+"\\test.csv";
|
12
12
|
|
13
13
|
// csvファイルを開く
|
14
|
-
using (System.IO.StreamReader sr = new System.IO.StreamReader(
|
14
|
+
using (System.IO.StreamReader sr = new System.IO.StreamReader(f, System.Text.Encoding.GetEncoding("shift_jis")))
|
15
15
|
{
|
16
16
|
// ストリームの末尾まで繰り返す
|
17
17
|
while (!sr.EndOfStream)
|
1
読み込み情報の変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,8 +8,10 @@
|
|
8
8
|
|
9
9
|
###該当のソースコード
|
10
10
|
```C#
|
11
|
+
String fname = System.IO.Path.Combine(new System.IO.FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).Directory.FullName, "test.csv");
|
12
|
+
|
11
|
-
|
13
|
+
// csvファイルを開く
|
12
|
-
using (System.IO.StreamReader sr = new System.IO.StreamReader(
|
14
|
+
using (System.IO.StreamReader sr = new System.IO.StreamReader(fname, System.Text.Encoding.GetEncoding("shift_jis")))
|
13
15
|
{
|
14
16
|
// ストリームの末尾まで繰り返す
|
15
17
|
while (!sr.EndOfStream)
|