質問編集履歴

2

ファイル読み込みの変更

2016/09/05 12:45

投稿

sobue
sobue

スコア329

test CHANGED
File without changes
test CHANGED
@@ -18,13 +18,13 @@
18
18
 
19
19
  ```C#
20
20
 
21
- String fname = System.IO.Path.Combine(new System.IO.FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).Directory.FullName, "test.csv");
21
+ String f = System.Windows.Forms.Application.StartupPath+"\\test.csv";
22
22
 
23
23
 
24
24
 
25
25
  // csvファイルを開く
26
26
 
27
- using (System.IO.StreamReader sr = new System.IO.StreamReader(fname, System.Text.Encoding.GetEncoding("shift_jis")))
27
+ using (System.IO.StreamReader sr = new System.IO.StreamReader(f, System.Text.Encoding.GetEncoding("shift_jis")))
28
28
 
29
29
  {
30
30
 

1

読み込み情報の変更

2016/09/05 12:45

投稿

sobue
sobue

スコア329

test CHANGED
File without changes
test CHANGED
@@ -18,9 +18,13 @@
18
18
 
19
19
  ```C#
20
20
 
21
- // csvファイルを開く
21
+ String fname = System.IO.Path.Combine(new System.IO.FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).Directory.FullName, "test.csv");
22
22
 
23
+
24
+
25
+ // csvファイルを開く
26
+
23
- using (System.IO.StreamReader sr = new System.IO.StreamReader(@"test.csv", System.Text.Encoding.GetEncoding("shift_jis")))
27
+ using (System.IO.StreamReader sr = new System.IO.StreamReader(fname, System.Text.Encoding.GetEncoding("shift_jis")))
24
28
 
25
29
  {
26
30