Export (0) Print
Expand All

LanguagePrimitives.ConvertTo Method (Object)

Converts an object to a specified type parameter.


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)

'Usage
Dim valueToConvert As Object
Dim returnValue As T

returnValue = LanguagePrimitives.ConvertTo(valueToConvert)

public static T ConvertTo<T> (
	Object valueToConvert
)

GenericParameters

T

The type of object to convert to.

Parameters

valueToConvert

The object to convert.

Return Value

The converted object.

Windows PowerShell can use standard Windows PowerShell language converters or custom converters to perform the type conversion. For more information about these converters, possible return values, and exceptions that might be thrown during the conversion process, see ETS Type Conversion.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms


Show:
© 2015 Microsoft