Split a string by semicolons on new line in c# -


i'm generating string dynamically , passed method further execution.

i want every string after ;(semicoln) on new line because ;(semicolon) character i'm unable parse.

 string mycode = "myclient client = new myclient();  var result = task.run(() =>   client.for<customer>().findentriesasync()).result.asenumerable<customer>();  return jsonconvert.serializeobject(result);"; 

right managed above string below how in single code when input above string ?

 string mycode = "myclient client = new myclient();";  mycode += environment.newline + "var result = task.run(() =>   client.for<customer>().findentriesasync()).result.asenumerable<customer>();";  mycode += environment.newline + "return jsonconvert.serializeobject(result);"; 

try this:

string.join(environment.newline, text.split(';')); 

Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -