编程题
(上机实验题在最后!)
----------------------------------------------分割线------------------------------------------------------------------------------
存储
存储----存储----存储
// An highlighted block
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace exci12
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string path = "F:\\MyTest1.txt";//文件名
if (File.Exists(path))
File.Delete(path);
else
{
FileStream fs = File.OpenWrite(path);
StreamWriter sw = new StreamWriter(fs,Encoding.Default);
sw.WriteLine(textBox1.Text);
sw