Using operator overloads for concatenating file system paths in CSharp

added by DotNetKicks
10/26/2017 12:53:09 PM

2 Kicks, 376 Views

The past few days, I've been working on some cross-platform C# code. In this code, I needed to build a path to a file, by concatenating folder names. As you may know the path separator on Windows and Linux operating systems are different: one has a backward slash (\), the other has a forward slash (/).