に私は以下のコードを使用してパスに不正な文字を取得しています:C#の不正な文字パス
string fileNameExisting = Application.StartupPath + "\\CodesLocation\\Template.pdf";
PdfReader templateFile = new PdfReader(fileNameExisting);
私はいくつかのバリエーションテスト:
string fileNameExisting = @Application.StartupPath + "\CodesLocation\Template.pdf";
PdfReader templateFile = new PdfReader(fileNameExisting);
しかし、それはまだ同じになっているが不正なエラーです。
誰かが私のコードが間違っているかどうか確認するのを助けることができますか?
ありがとうございました。
なぜ 'fileNameExisting'を出力しないので、違法な文字が何であるかがわかります。 – Nick
Application.StartupPathの値と共有を確認します。 –
これはc:\ Projects ...問題があれば返信してみましょう – kyusan93