no

How to Get the Local Directory of an Executing Assembly in C#

I used this code in C# to get the local directory of an executing assembly or application. var uri = new Uri(Assembly.GetAssembly(typeof(M...

I used this code in C# to get the local directory of an executing assembly or application.

var uri = new Uri(Assembly.GetAssembly(typeof(MyClass)).CodeBase);
var path = Path.GetDirectoryName(uri.LocalPath);
var outputPath = Path.Combine(path, "MyFolder")

Related

c# 6491653235772227697

Post a Comment Default Comments

Outsourcing

Are you looking for freelancers in the Philippines? Get in touch.

Donations

If you like what I do, you can support this channel by buying me a coffee. I would be grateful for your contribution! Your donations will help me create more FREE online courses and learning materials for programmers and remote workers.

item