Click here to Skip to main content
15,898,036 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
string body1 = " Dear User," + " " + user name + ""

I want a part of string bold like
Dear user , Rahul i want Rahul text bold......
Posted
Updated 18-Nov-13 19:32pm
v2

1 solution

string class does not hold any information about text formatting (bold, italic, etc...).
So specifying a bold attribute on a simple string is impossible.

Depending on your target technology (Windows Forms, WPF, etc...) the solution will be different : in Winforms there is a RichTextBox which allows to apply several formattings to a given text ; in WPF and ASP.NET this is more trivial as there is a special tag for applying bold attribute to a text.
 
Share this answer
 
Comments
Rahul JR 19-Nov-13 1:49am    
is it possible in strindBuiler....
phil.o 19-Nov-13 1:52am    
No.
Orcun Iyigun 19-Nov-13 1:54am    
No!
Rahul JR 19-Nov-13 1:53am    
ok thank you....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900