ExecutablePath
How do I use Executable Path
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
215 | string sPath = Application.ExecutablePath; | 1 |
File name: Form1.cs
Copy
212 protected override void OnLoad(System.EventArgs e)
213 {
214 base.OnLoad(e);
215 string sPath = Application.ExecutablePath;
216 sPath = System.IO.Path.GetDirectoryName(sPath);
217
218 if (sPath.EndsWith("\\bin"))
219 {
220 sPath = sPath.Substring(0, sPath.Length - 4);
221 }
222
223 gradeclass.DataModule = new gradeclass(sPath);
224
225 }
ExecutablePath 124 lượt xem
Gõ tìm kiếm nhanh...