Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to get the directory of the project in c#

using System;
using System.IO;

// This will get the current WORKING directory (i.e. inDebug)
string workingDirectory = Environment.CurrentDirectory;
// or: Directory.GetCurrentDirectory() gives the same result

// This will get the current PROJECT bin directory (ie ../bin/)
string projectDirectory = Directory.GetParent(workingDirectory).Parent.FullName;

// This will get the current PROJECT directory
string projectDirectory = Directory.GetParent(workingDirectory).Parent.Parent.FullName;
Comment

C# get project directory

string wanted_path = Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()));
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# convert string to char array 
Csharp :: sort a dictionary by value in c# 
Csharp :: OnCollision update 
Csharp :: unity time.deltatime timescale 0 
Csharp :: how to maximize but show taskbar c# 
Csharp :: base64 bit string to pdf c# 
Csharp :: wpf label text color rgb string 
Csharp :: c# stop 
Csharp :: c# declare empty string array 
Csharp :: c# download file 
Csharp :: mouse click unity raycast unity 
Csharp :: c# create datatable 
Csharp :: #3d271d 
Csharp :: how check if variable is send to page or not in laravwel 
Csharp :: change image source wpf 
Csharp :: wpf make both rich Text scroll 
Csharp :: c# square every digit of a number 
Csharp :: .NET Microsoft.dotnet-httprepl 
Csharp :: how to change scenes in unity 
Csharp :: how to show a reference in unity 
Csharp :: unity 3d sound 
Csharp :: how to make a for loop in c# 
Csharp :: unity destroy self 
Csharp :: c# request run as administrator 
Csharp :: transform.rotate unity 
Csharp :: change textbox text color c# 
Csharp :: unity keycode 
Csharp :: c# shuffle array 
Csharp :: ession in class c# 
Csharp :: c# read text file separated by comma 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =