Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

LanguagePrimitives.ConvertTo Method

Converts an object from one type to another. The variants of this method can be used to convert the object with or without providing an IFormatProvider interface for use in the type conversion.

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

NameDescription
LanguagePrimitives.ConvertTo (Object, Type)Converts an object from one type to another.
LanguagePrimitives.ConvertTo (Object, Type, IFormatProvider)Converts an object from one type to another, and provides an IFormatProvider interface for use in the type conversion.
LanguagePrimitives.ConvertTo (Object)Converts an object to a specified type parameter. Introduced in Windows PowerShell 3.0.


Show:
© 2015 Microsoft