Amit Ranjan Amit Ranjan - 9 months ago 63 Question

How do I get path of the Directory inside my WinForm app project

I have a directory named reports inside my winform project in .net. My project name is AccountingReports and inside that Directory reports exists. So i need the way to access this path via code. In we use Request.PhysicalApplicationPath property. So is there any method or property exists that will give me the root of my project


You can use:


Gets the current working directory of the application.

You can then append "Reports" to that using the following:

Path.Combine(string, string):

Dim reportsFolder As String
reportsFolder = Path.Combine(Directory.GetCurrentDirectory(), "Reports")