Saves the contents of a System.Windows.Forms.RichTextBox control to an open data stream.
- data
- The data stream that contains the file to save to.
- fileType
- One of the System.Windows.Forms.RichTextBoxStreamType values.
This version of the RichTextBox.SaveFile(string) method enables you to save the entire contents of the control to the data stream that is already opened. The data stream can then save the information to a file. You can use the RichTextBox.LoadFile(string) method to load the contents of a file into the System.Windows.Forms.RichTextBox.
This version of the RichTextBox.SaveFile(string) method also enables you to specify a data format of the information that will be sent to the System.IO.Stream object.