Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
file.pdfをWinformsアプリのAppDataフォルダーにコピーする必要がありますが、これは多くの人が使用するため、次のような一般的なパスが必要です。
iFile.CopyTo("somethinghere...//AppData//Temp//file.pdf");
上記のファイルをコピーします。
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)現在のユーザーのappdataフォルダーを取得します。
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
すべてのユーザーにPDFの単一コピーが必要な場合は、Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)代わりにを使用してください。
Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)
環境 に関するMSDN.GetFolderPath環境に関するMSDN.SpecialFolder