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";
if (!File.Exists(path))
{
StreamWriter sw = new StreamWriter(path);
sw.WriteLine("hello");
sw.Close();
}
else
{
StreamWriter swr = new StreamWriter(path, true);
swr.WriteLine("heheehheehe");
swr.WriteLine("lallalaalal");
swr.Close();
}
}
}
}
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";
if (!File.Exists(path))
{
StreamWriter sw = new StreamWriter(path);
sw.WriteLine("hello");
sw.Close();
}
else
{
StreamWriter swr = new StreamWriter(path, true);
swr.WriteLine("heheehheehe");
swr.WriteLine("lallalaalal");
swr.Close();
}
}
}
}
0 comments:
Post a Comment