namespace WinFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
// public static void Move (string (old)sourceFileName, (new)string destFileName);
string oldfilename = "data.txt";
if (File.Exists(oldfilename))
{
File.Move(oldfilename, "data.bin");
}
}
}
}
/*
* run:
*
*
*
*/