Connecting to a retwork resource

J

Jonathan Hoch

I am trying to connect to a network resource (e.g. a remote directory) and
am unable to find how to do this.
When writting in C I used WNetAddConnection2.

Thanks,

Jonathan Hoch.
 
C

Christopher Kimbell

Hi Jonathan,

When using the different file related classes, you can pass an UNC path.

E.g.

If(File.Exists(@"\\server\share\folder\test.txt") == true)
{
StreamReader sr = new
StreamReader(@"\\server\share\folder\test.txt") );

//add manipulation code here
}



Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top