Hey people...
I'm really not very good with c#, this is pretty much my first crack and I like it...but i'm pretty stuck and would really appreciate some help if you could
I'd like to get a string from textbox1, then on button click, send this text to textbox2 with 'x' after every other character in the string originally in textbox1.
In other words, textbox 1 would read "this is a string", then on button blick, textbox 2 would read 2= "txhxixs xixs xa xsxtxrxixnxg" it may seem a little daft but its for writing data to a com port, but the output theory would be the same...
So something like:
private void button1_Click(object sender, System.EventArgs e)
{
char[] inputtext = textBox1.Text.ToCharArray()
string letterx = ((char)120).ToString();
for (int i = 0,i<inputtext.length;i++)>
{
textBox2.Text = (inputtext, i, 0);
Thread.Sleep(200);
textBox2.Text = (letterx.ToString());
Thread.Sleep(200);
}
}
So far i've been writing to the com port using
serialPort1.Write(inputtext2, i, 1)
, but this only seems to send a single character
i'd really appriciate any help you guys could give
cheers,
M