Solved

Assign Path

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

772 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