3
Answers

how

sarada

sarada

15y
2.6k
1
hi,
char digit = Convert.ToChar(((TextBox)sender).Text[0]);
iax.sendDTMF(digit);
This is the code i was using for textbox under textchanged event.I have a clear button to clear this textbox

int len = txtCallTo.Text.Length;
if (!(txtCallTo.Text == ""))
{
txtCallTo.Text = txtCallTo.Text.Substring(0, len - 1);
}
so when i was clearing the textbox,the error is showing index was outside the bounds of array.there is no problem with clear,but with
TextBox)sender).Text[0].so how can i do


Answers (3)