Darrell Norton's Blog [MVP]

Sponsors

The Lounge

Wicked Cool Jobs

News

  • Darrell Norton pic

    MVP logo

    View Darrell Norton's profile on LinkedIn

    Currently Reading:

    weewar.com

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Path.Combine

One of the big takeaways from last night's user group meeting was Path.Combine.  This method allows you to combine file paths without worrying about the separator character!  It will add the separator if there isn't one in the method's arguments.  Great for user-entered values.  Check out the Path class documentation for more info.


Posted Wed, Oct 8 2003 11:41 AM by Darrell Norton

[Advertisement]

Comments

Jeff Seifert wrote re: Path.Combine
on Mon, Mar 1 2004 7:10 AM
This also has the advantage of using OS-agnostic path separators. Thus, if you ever ran your program on UNIX or Linux using Mono or other .NET engine, this command would use the '/' directory separator instead of '\'.

It might not be important now, but perhaps someday.
Darrell wrote re: Path.Combine
on Mon, Mar 1 2004 7:13 AM
Jeff - good comment. I think it is important to have your app run on Mono if it is meant for the world (as opposed to being developed as part of a consulting gig). It just opens up a wider audience, particularly those that are pro open source, who tend to be good advocates for good software.
Devlicio.us