asp.net - Remove The Space in a String in c# -


i want know how remove space in string. example take string a= "hello world". once whitespace found "hello" , "world" should separated , stored in separate strings. b="hello" , c="world". possible do. can me.

thanks in advance.

do

  var words = a.split(' '); 

this return array each word in one

foreach(var word in words) {    trace.writeline(word); } 

http://msdn.microsoft.com/en-us/library/b873y76a.aspx


Comments