Converts a source to the given type.

Namespace: MonoSoftware.Core
Assembly: MonoSoftware.Core (in MonoSoftware.Core.dll) Version: 1.0.40.669 (1.0.40.669)

Syntax

C#
public static Object ConvertTo(
	this Object source,
	Type conversionType,
	TypeConverter typeConverter,
	bool convertToUTF8
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function ConvertTo ( 
	source As Object,
	conversionType As Type,
	typeConverter As TypeConverter,
	convertToUTF8 As Boolean
) As Object
Visual C++
public:
[ExtensionAttribute]
static Object^ ConvertTo(
	Object^ source, 
	Type^ conversionType, 
	TypeConverter^ typeConverter, 
	bool convertToUTF8
)
F#
static member ConvertTo : 
        source : Object * 
        conversionType : Type * 
        typeConverter : TypeConverter * 
        convertToUTF8 : bool -> Object 

Parameters

source
Type: System..::..Object
Source to convert
conversionType
Type: System..::..Type
Convert to type
typeConverter
Type: System.ComponentModel..::..TypeConverter
Type converter used to convert value
convertToUTF8
Type: System..::..Boolean
If true and if source object is a string then it is converted to UTF8

Return Value

Type: Object
Converted source to given type

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Object. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also