How to get the current user directory in C#?
You get the current user directory in C# by usingGetFolderPath()
method and specify Environment.SpecialFolder.UserProfile
as parameter.Example
string path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);