DNK has a spanking new server up and running like clockwork. Stability problems are a thing of the past. Our new monitoring service reports 100% uptime since the move!
29
kicks
published 2 years ago, submitted by mberseth mberseth 2 years ago

mattberseth.com — System.IO.Path has a number of utility methods that are useful when you have to progamatically build a file path ...

Add a comment 2 comments | category: | Views: 45 | Get KickIt image code
Quick Tip: Use System.IO.Path.Combine instead of string concatenation
tags: , , , | tag it

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:
Yep, System.IO.Path is the way to go. I see application errors just waiting to happen whenever I see paths being built in our applications without using the Combine() method.
posted by JustinF 2 years ago
Just make sure you watch out for absolute paths in the second argument. I have seen security holes caused by people trying to use Path.Combine to keep users within a specific directory.

http://grauenwolf.spaces.live.com/blog/cns!410AE16A9B73776E!164.entry
posted by grauenwolf 2 years ago



information Login or create an account to comment on this story

Related Stories:
 

Search: