G
Guest
Hello,
I am new to C# and am having a problem with my program. I have created a
small test to try and find the problem but I can't seem to find it. The
following code is my test.
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace test
{
class Program
{
static private string driveletter = "H:\\corp\\";
static private string uncpath = "\\\\lrlcadd03\\corp\\";
static void Main()
{
// This line works fine.
File.Copy(driveletter + "test.txt", driveletter + "my.txt");
//This line produces the error.
File.Copy(uncpath + "test.txt", uncpath + "my1.txt");
}
}
}
Can anyone tell me why the unc path is not working?
I am new to C# and am having a problem with my program. I have created a
small test to try and find the problem but I can't seem to find it. The
following code is my test.
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace test
{
class Program
{
static private string driveletter = "H:\\corp\\";
static private string uncpath = "\\\\lrlcadd03\\corp\\";
static void Main()
{
// This line works fine.
File.Copy(driveletter + "test.txt", driveletter + "my.txt");
//This line produces the error.
File.Copy(uncpath + "test.txt", uncpath + "my1.txt");
}
}
}
Can anyone tell me why the unc path is not working?