Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Assign Path

Posted on 2013-12-05
1
Medium Priority
?
281 Views
Last Modified: 2013-12-05
I want to know why is it necessary to have the @ symbol while writing to a file or while assigning a path..

StreamWriter Det = new StreamWriter(@"\\inrms150\RDMXML$\ItemMaster\Log_ABS\ItemUploadError.txt", true);

Open in new window

0
Comment
Question by:Moizsaif123
1 Comment
 
LVL 22

Accepted Solution

by:
Mrunal earned 2000 total points
ID: 39697960
Hi
"\" is escape character.

It is not always necessary to have @ symbol always.

You can write like this also:

StreamWriter Det = new StreamWriter(@"\\inrms150\RDMXML$\ItemMaster\Log_ABS\ItemUploadError.txt", true);

StreamWriter Det1 = new StreamWriter("\\\\inrms150\\RDMXML$\\ItemMaster\\Log_ABS\\ItemUploadError.txt", true);


more information:

http://www.peachpit.com/articles/article.aspx?p=31938&seqNum=9
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Integration Management Part 2

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question