The
RichtextBox[
^] has a
Rtf
property holding text and format directives. It is a string property.
You could convert it to byte array this way:
string rtf = myRichtextBox.Rtf;
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(rtf);
Here I used UTF8 encoding, but that choice is up to you.
Hope this helps.
EDIT: Later, if you want to recover original string from byte array, it can be done this way:
string originalRtf = System.Text.Encoding.UTF8.GetString(bytes);
You have to use the same Encoding in both operations.