sarada

sarada

  • NA
  • 34
  • 0

how

May 27 2009 3:59 AM
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)