Path in C#

  • Thread starter Thread starter Rafael tejera
  • Start date Start date
R

Rafael tejera

How I can specify a valid path. I'm new..

is c:\Image\image.jpeg

or c:\\image\\image.jpeg ?


Rafael
 
Rafael said:
How I can specify a valid path. I'm new..

is c:\Image\image.jpeg

or c:\\image\\image.jpeg ?


Rafael

string Path = @"c:\image\image.jpeg";

The @ operator obviates the need for escape characters.
 
Ysgrifennodd Rafael tejera:
How I can specify a valid path. I'm new..

is c:\Image\image.jpeg

or c:\\image\\image.jpeg ?


Rafael

Hi Rafael,

You can do:

"c:\\image\\image.jpeg"

Or you can do:

@"c:\Image\image.jpeg"

Good, eh?


Peter
 
Prepend the path string with @ --

string myPath = @"c:\temp\images\whataver.jpg";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Crazy Image Problem 3
Change the working directory of WebBrowser control? 1
Validate Zip Code 2
MAC Address 4
Export Image 1
save image 1
Datalist Image 1
Environment error in C# 2

Back
Top