Monday, March 3, 2008

Method Path.Combine()

To Combine 2 path strings (for example, file path and file name) it is suggested method

Path.Combine(string path1, string path2).

Samples:

Path1 Path2 Path.Combine()
"C:\\Temp" "file.txt" "C:\\Temp\\file.txt"
"C:\\Temp" "C:\\Temp\\file.txt" "C:\\Temp\\file.txt"

Additional Links:

Path..::.Combine Method

No comments: