.NET provides in its System.IO namespace the Path class which performs operations on String instances that contain file or directory path information. These operations are performed in a cross-platform manner.

Most of the time we see develeopers writing code like

But by using Path.Combine we can provide a cross platform path

By using the Path and Combine method, one can at least eliminate some of the headache of porting to another platform.