using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace file
{
class Program
{
static void Main(string[] args)
{
string path = "my_text.txt";
// copy a file
int a = 0;
try
{
if (a == 0)
{
File.Copy(path, "hell.txt" );
a++;
}
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}
if (a > 0)
{
Console.WriteLine("file copied");
}
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace file
{
class Program
{
static void Main(string[] args)
{
string path = "my_text.txt";
// copy a file
int a = 0;
try
{
if (a == 0)
{
File.Copy(path, "hell.txt" );
a++;
}
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}
if (a > 0)
{
Console.WriteLine("file copied");
}
}
}
}
0 comments:
Post a Comment