Solved

Assign Path

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
getting id from database 5 37
Search by two fields at the same time using c# radio button 5 39
Angular JS Route 3 54
Entity Framework 7 32
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…
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 Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now