separate a string by a space

Hello again, i have a string that contains two words separated by a space. i need to save the both words in an array. how i can to separate them

in VB you can do "InStr(string)" to take the position and use left() or right() to do that.

Thanx




Answer this question

separate a string by a space

  • Al-Arabi

    string[] result = myString.Split(new Char[] {' '});


  • separate a string by a space