deva nathan

deva nathan

  • NA
  • 74
  • 18.6k

using split() method in c# , i split the word using space

Nov 20 2012 12:27 AM
this is the program

  string[] words = TextBox1.Text.Split(' ');
        string fName = words[0];
        string lName = words[1];
        TextBox2.Text = fName.ToString();
        TextBox3.Text = lName.ToString();


i split the two  word using space , but in a single word it have some error like "Index was outside the bounds of the array." then how  to solve it

Answers (1)