inp_str = textBox1.Text;
int intLng = inp_str.Length;
char[] chAray = new char[2 * intLng];
for (int i1 = 0; i1 < inp_str.Length; i1++)
{
chAray[2 * i1] = inp_str[i1];
chAray[2 * i1 + 1] = ',';
}
foreach (var item in chAray)
{
mod_str += item;
}
MessageBox.Show(mod_str);
You might need to change the conversion a bit, because your code adds a comma even after the last character and it ends up looking like:
e,x,a,m,p,l,e,
Might I also suggest you use a StringBuilder type for mod_str and append each character to that, instead of concatenating characters to a String.
Take care