Connecting to a retwork resource

  • Thread starter Thread starter Jonathan Hoch
  • Start date Start date
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.
 
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
 
Back
Top