c#问题!100分

来源:百度知道 编辑:UC知道 时间:2024/05/14 05:57:28
我用C#写了一个小程序,记录我每天的收入与支出!openfiledialog和savefiledialog我都添加了并且实现了,但是我想请问接下来我怎样才能做到真正的保存文件呢?还需要些什么呢?答案满意我出100分!越清楚越好!

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;

namespace RichText
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.RichTextBox rtxContent;
private System.Windows.Forms.MenuItem menuItemOpen;
private System.Windows.Forms.MenuItem menuItemSave;
private System.Windows.Forms.ToolBar tbrStatus;
private StreamReader sr;
private StreamWriter sw;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;

public Form1()
{
//
// Windows 窗体设计器支持所必需的