FontNamesConverter.ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)

Converts a string that represents a list of font names into an array of strings containing individual font names.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public:
virtual Object^ ConvertFrom (
	ITypeDescriptorContext^ context, 
	CultureInfo^ culture, 
	Object^ value
) override
public Object ConvertFrom (
	ITypeDescriptorContext context, 
	CultureInfo culture, 
	Object value
)
public override function ConvertFrom (
	context : ITypeDescriptorContext, 
	culture : CultureInfo, 
	value : Object
) : Object
Not applicable.

Parameters

context

A System.ComponentModel.ITypeDescriptorContext object that provides information about the context of a type converter. This parameter is not used in this method. It is reserved for future versions of this method. You can optionally pass in a null reference (Nothing in Visual Basic) for this parameter.

culture

A System.Globalization.CultureInfo object that represents information about a culture such as language, calendar system, and so on. This parameter is not used in this method. It is reserved for future versions of this method. You can optionally pass in a null reference (Nothing in Visual Basic) for this parameter.

value

A System.Object instance that represents the source string to convert from.

Return Value

A System.Object instance that represents the array of strings containing the individual font names.

Exception typeCondition

GetConvertFromException

value is not of type String.

Use the ConvertFrom method to convert a 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 that 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.

NoteNote:

The context and culture parameters are not used in this version of the method; they are reserved for future versions of the method. You can optionally pass in a null reference (Nothing in Visual Basic) for these parameters.

The following code example demonstrates how to use the ConvertFrom method to convert a string with a list of font names to an array of strings containing the individual names.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: