Using / or \\ for folder paths in C#

后端 未结 5 2024
野的像风
野的像风 2020-12-10 11:13

When writing file paths in C#, I found that I can either write something like \"C:\\\" or \"C:/\" and get the same path. Which one is recommended? I heard somewhere that usi

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-10 11:36

    Use Path.Combine and you don't need to worry about such semantics.

提交回复
热议问题