zon7 wrote:
Hi, I'm trying to make a chat program, but it seems to have some kind
of problem with the some characters. To be more precise, the only
characters giving me problem are "{" and "}".
When I try to send them with
stream.Write(A,0,A.Length);
where A is a String
it tells me that there is a incorrect character.
Any help?
There isn't an overloaded method for StreamWriter.Write that takes the
string to be written, start index, and length. The method you are
trying to call is Write (string, object, object) as described here
http://msdn2.microsoft.com/en-us/library/fd857wct.aspx.
If you want to write the string as an array of chars then you could use
this call:
stream.Write (A.ToCharArray (), 0, A.ToCharArray ().Length);
Or if you just want to write the string then call:
stream.Write (A);
Let me know if this helps,
Nick
http://seecharp.blogspot.com/