alternative method for entering path in DOTNET

hi friends

you may came across the situation to enter any path of drive or folder with extra slash

if there exists a file in c drive and

 if its original path is

” c:\folder1\file1.doc” then we will write the same path in dotnet Programe as


here we use an extra slash for every single slash and we know why we do so .. its because dotnet will consider single slash as new line charector

still if you want to use single slash ….  you have a small trick

we should do like this

for the path

” c:\folder1\file1.doc”

write like this

@” c:\folder1\file1.doc”

this @ simbol will act as substitute for all single slashhes





About kakani santosh kumar

Working as Software Engineer in Prithvi Information Solutions having 3 years of Experience in Dotnet Framework ranging from 1.1 to 3.5
This entry was posted in Articles, Interview Questions and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s