Solved

Assign Path

Posted on 2013-12-05
1
274 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 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

828 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