Hello friends !
Now, we will learn How to Get and Set Current Directory in C#.
The SetCurrentDirectory method sets the specified directory as the current directory. The GetCurrentDirectory method returns the current directory.
string root = @"C:Temp"; Directory.SetCurrentDirectory(root); Console.WriteLine(Directory.GetCurrentDirectory());
I wish you success, please leave a comment below, we will answer all your questions.