Grant <gpsnett@hotmail.com> wrote:[color=blue]
> While iterating through a loop and building a string is it possible to
> format certain string value? the completed string eventually gets passed to
> a rich TextBox.
>
> for example:
>
> ------------------
> string thing = "";
> foreach (Dataset.Row row in rows)
> {
> if ( row.name == "whatever" )
> {
> thing += row.name; //somehow format the
> row.name to bold before it goes into the string
> }
> thing += row.name;
> }
> -----------------[/color]
The string itself isn't bold or anything similar - you need to work out
how to make it bold in the RichTextBox, i.e. applying rich text
formatting.
I would also suggest using a StringBuilder rather than string
concatenation like the above.
--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too