System.Web.UI.WebControls Namespace
Converts a string containing a list of font names to an array of strings containing the individual names. Also performs the reverse function.
Use the ConvertFrom method of this class to convert a single string containing a list of font names to an array of strings containing the individual names. Each font name in the string must be separated by a comma. For example, the string, "arial, times new roman, verdana", converts to an array that contains the strings "arial", "times new roman", and "verdana". Notice the commas are removed along with any white space at the beginning or end of the font name. White space in the middle of a font name is not removed.
The ConvertTo method performs the reverse operation. It converts an array of strings containing the individual font names to a single string containing a list of the names. For example, an array that contains the strings "arial", "times new roman", and "verdana" converts to the string, "arial,times new roman,verdana". Notice commas are automatically inserted between the font names without any white space.
Use the CanConvertFrom method to verify that the conversion can be made before using the ConvertFrom method.
The following example demonstrates how to use the FontNamesConverter class to convert a string with a list of font names to an array of strings containing the individual names. The array of strings is then converted back to a single string and displayed.
Show me
System.ComponentModel.TypeConverter