Combining Paths

Maybe I’m a slow learner or maybe this is one of those beautifully hidden features of the .NET framework but I came across a nifty little static method (thanks to this post on StackOverflow), Path.Combine(string1, string2); I can’t count the number of …


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail

Maybe I'm a slow learner or maybe this is one of those beautifully hidden features of the .NET framework but I came across a nifty little static method (thanks to this post on StackOverflow), Path.Combine(string1, string2); I can't count the number of times I'd written a method to ensure a trailing \, and append one if it didn't exist, all because of some lack-of-knowledge. So keep this method handy in your knowledge bag for next time you are building file system paths!


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail


Print Share Comment Cite Upload Translate
APA
Posts on LINQ to Fail | Sciencx (2022-12-09T15:50:42+00:00) » Combining Paths. Retrieved from https://www.scien.cx/2008/12/05/combining-paths/.
MLA
" » Combining Paths." Posts on LINQ to Fail | Sciencx - Friday December 5, 2008, https://www.scien.cx/2008/12/05/combining-paths/
HARVARD
Posts on LINQ to Fail | Sciencx Friday December 5, 2008 » Combining Paths., viewed 2022-12-09T15:50:42+00:00,<https://www.scien.cx/2008/12/05/combining-paths/>
VANCOUVER
Posts on LINQ to Fail | Sciencx - » Combining Paths. [Internet]. [Accessed 2022-12-09T15:50:42+00:00]. Available from: https://www.scien.cx/2008/12/05/combining-paths/
CHICAGO
" » Combining Paths." Posts on LINQ to Fail | Sciencx - Accessed 2022-12-09T15:50:42+00:00. https://www.scien.cx/2008/12/05/combining-paths/
IEEE
" » Combining Paths." Posts on LINQ to Fail | Sciencx [Online]. Available: https://www.scien.cx/2008/12/05/combining-paths/. [Accessed: 2022-12-09T15:50:42+00:00]
rf:citation
» Combining Paths | Posts on LINQ to Fail | Sciencx | https://www.scien.cx/2008/12/05/combining-paths/ | 2022-12-09T15:50:42+00:00
https://github.com/addpipe/simple-recorderjs-demo