Stream writer in c#

K

Kiran

Hi,

Can we use network path for reading the file using streamwrite function?

The below code is working fine.

string strContentsTemp, tmp;
StreamWriter objWriter;
strContentsTemp = this.TextBoxHttpFetch.Text;
tmp = "C:\\temp:\\xyz.cfg"
objWriter = new StreamWriter(SGMSDashBoardConstants.HttpFetchLocation );
objWriter.Write(strContentsTemp);
objWriter.Close();
objWriter = null;


Can I use

tmp="\\\\15.220.108.44\\c$\\abc\\xyz\\test.cfg" in the above code?

Please explain how to access remote files. Assume the directory is shared.

Thanks in advance.

Regards.
 

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