In .NET what is the difference between:
Environment.CurrentDirectory
Directory.GetCurrentDirectory()
? Of course, Environment.CurrentDirectory
is a property which can be set and obtained.
Are there any other differences?
As David says: they do the same thing. Internally, when getting Environment.CurrentDirectory
it will call Directory.GetCurrentDirectory
and when setting Environment.CurrentDirectory
it will call Directory.SetCurrentDirectory
.
Just pick a favorite and go with it.