Post navigation ← Previous Next → ファイル名からパス名のみを取得する Posted on 2013年6月12日 by dorudoru Path.GetDirectoryName()関数を使います。 // 結果:c:\hogehoge\temp System.IO.Path.GetDirectoryName(@"c:\hogehoge\temp\hoge.txt");
コメントを残す