How do I save my whole program?
- by user1444829
What argument should be in this missing part of formatter.Serliaze to get the program to save just the program as a .exe?
Ignore the Openfiles.
class FileOption
{
OpenFileDialog openDialog = new OpenFileDialog();
SaveFileDialog saveDialog = new SaveFileDialog();
BinaryFormatter formatter = new BinaryFormatter();
public void Open()
{
}
public void Save()
{
if (saveDialog.ShowDialog() == DialogResult.OK)
{
FileStream file = new FileStream(saveDialog.FileName, FileMode.Create);
formatter.Serialize(file, x); // x means that i havent set anything there yet//
file.Close();
}
}
}