I am trying to build a test harness to practice appending strings to an rtf
string. I am doing this to simulate the string I'll be sending over the wire
and receiving on the other end of an IM application. Below is the code I use
to test.
I receive this error everytime I try to send the string from one rtb to
another:
"File Format is not valid Line 28" Line 28 is where I set rtb2 to the value
of the newly concatanated string----rtb2.Rtf =rtbBuild;
private void button1_Click(object sender, EventArgs e)
{
try
{
String msgCode = "101;";
String socketid = "2,";
String rtbVals = rtb1.Rtf.ToString();
String rtbBuild = msgCode + socketid + rtbVals;
rtb2.Rtf =rtbBuild;
}
catch (Exception excep)
{
MessageBox.Show(excep.ToString());
}
}
any ideas as to why I'm receivng this error? Thanks for any help!