private string Bold(string str)
{
return Convert.ToString(new Font(Bold(str)));
}
How can I convert a string text to bold in C#? I'm typing like this but I'm getting an error.
private string Bold(string str)
{
return Convert.ToString(new Font(Bold(str)));
}
How can I convert a string text to bold in C#? I'm typing like this but I'm getting an error.
It depends what you are trying to achieve. string itself shouldn't know anything about text style. The Font class that you have used is for presentation of the string but not for storing the string itself.
In web development presentation layer should be described in css, so I think you should use css font-weight property.