it's quite simple my dear , no need for functions ... this is my advice to improve ur programming skills .
here u are :
see the result of ur Example here :
http://www.m76at.com/upload/image17217.html[
^]
the code :
<pre lang="cs">private void button1_Click(object sender, EventArgs e)
{
int size;
string word = textBox1.Text;
size = word.Length;
char[] array = new char[size];
array = word.ToCharArray();
if (size % 2 != 0)
size += 1;
for (int i = 0; i < size-2; i += 2)
{
textBox2.Text += array[i].ToString() + array[i + 1].ToString() + ",";
}
}
this is the source code :
http://www.zshare.net/download/836108228e67fdfd/
good luck :)