How to get application path in windows application c#


















I'm working on a Windows CE. NET CF2. CodeBase; MessageBox. Show adres ;. Top Rated Most Recent. Accept Solution Reject Solution. For the current assembly you can use:. Copy Code. Posted 4-Sep pm Wendelius. Sergey Alexandrovich Kryukov 5-Sep am. This is the only universal and reliable way I know.

All other create problem in different cases. A bit more detail in my solution -- please see. Wendelius 5-Sep am. Thank you :. Here is the most universal way: C. Posted 4-Sep pm Sergey Alexandrovich Kryukov.

Good addition, my 5. Thank you, Mika. Zeeshan-Ali89 6-Feb am. Thnx alot. Use AppDomain. Posted 7-Sep pm raviprajapat. The Problem I am facing is that I have created a folder in bin named Image, where I am saving images, but when I open dialog for selecting image so its location is changed and when i save it then its giving error, plz tell me how can i reset the default location.

Password recovery. Recover your password. Get help. Post Views: Net c. Passing Parameters From one window to Another window c. Random Number Generate using c. Please enter your comment! Please enter your name here. You have entered an incorrect email address! Active 8 years, 6 months ago. Viewed 3k times. Suppose I have the following scenario.

I have gone through many questions here. But could not find a suitable answer. Improve this question. Sam Leach Nisha Nisha 1, 16 16 silver badges 27 27 bronze badges. Have you tried something along Path. GetFullPath ". Add a comment. Active Oldest Votes. Most of your question is irrelevant because you shouldn't be concerned in the actual cs file, it won't matter when its compiled, it looks like you can do Path. Combine AppDomain. Improve this answer. Sayse Sayse Edit: It's common and good practice to store your log path in your app.

AppSettings["LogPath"]; Now you have a centralized place to store your logs. Sam Leach Sam Leach



0コメント

  • 1000 / 1000