csharp get current directory

Code Example - csharp get current directory

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

get current directory csharp \

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

csharp get script directory

                        
                                string appPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath);
                            
                        
 

get working directory csharp

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

get execution directory csharp

                        
                                string logsDirectory = Path.Combine(Environment.CurrentDirectory, "logs");
                            
                        
 

how to get current dir in csharp

                        
                                Environment.CurrentDirectory
                            
                        
 

csharp current dir

                        
                                string appPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath);