vb.net to c# code conversion -


what c# equivalent code

    dim arlines() string dim int     arlines = split(rtb1.text, vbnewline)     = 0 ubound(arlines)         ''# rtb2.text = arlines(i)     next  

string[] arlines; arlines = rtb1.text.split(new string[] { environment.newline }, stringsplitoptions.none); for( int = 0; < arlines.length; ++i ) {     rtb2.text = arlines[i]; } 

that's done, code wipes out text property of rtb2 each iteration (i'm assuming not supposed commented out in example), may this:

string[] arlines; arlines = rtb1.text.split(new string[] { environment.newline }, stringsplitoptions.none); rtb2.text = arlines[arlines.length-1];     

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -