What is the advantage of using Path.Combine over concatenating strings with ‘+’?

Path.Combine uses the Path.PathSeparator and it checks whether the first path already has a separator at the end so it will not duplicate the separators. Additionally, it checks whether the path elements to combine have invalid chars.

Leave a Comment