c# string formatting for printing -
i saw somewhere on board created string print held multiple variables print form. can find original question use way string constructed.
i want have string hold this.
string("|", {size of field1}, "|", {size of field2}, "|", {size of field3}, "|"), field1, field2, field3); i want size each field constant makes nice table.
string formattedstring = string.format("{0}|{1}|{2}", field1, field2, field3); alternatively if you're not sure how many strings combine have can use join method.
string formattedstring = string.join("|", stringstojoin); in case stringstojoin should array.
Comments
Post a Comment