Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# get current directory

string currentDir = System.IO.Directory.GetCurrentDirectory();
//returns the current directory of the application when executing
Comment

get current directory c#

System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
Comment

get working directory c#

var DDIR = System.IO.Directory.GetCurrentDirectory();
var WorkingDirectory = "";
int index = DDIR.IndexOf(@"");
if (index > 0)
	WorkingDirectory = DDIR.Substring(0, index) + @"";
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# compile into an exe 
Csharp :: unity how to load a scene 
Csharp :: round float c# 
Csharp :: hide datagrid column c# 
Csharp :: print random number unity 
Csharp :: how to pause code execution in c# 
Csharp :: c# socket listen on port 
Csharp :: how to create a list in c# unity 
Csharp :: C# push list 
Csharp :: c# letters only 
Csharp :: c# sqlite query 
Csharp :: button size xamarin 
Csharp :: loop through string array c# 
Csharp :: c# list grouping 
Csharp :: csharp 
Csharp :: c# create object with properties 
Csharp :: return json from controller c# 
Csharp :: c# minus days from datetime 
Csharp :: c# making a folder 
Csharp :: forech unity 
Csharp :: get all child gameObject of gameObject C# 
Csharp :: blazor swagger setup 
Csharp :: switch case c# contains 
Csharp :: redirect to another controller page in asp.net core 
Csharp :: c# dictionary to json 
Csharp :: ienumerable count 
Csharp :: can you have multiple statement in a case c# 
Csharp :: c# Get all class by namespace 
Csharp :: how to add item in list at first position c# 
Csharp :: NET Framework 4.7.1 or a later update is already installed on this computer. 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =