ConvertThroughString Class
Enables the LanguagePrimitives.ConvertTo method to convert a type to another type by using a string conversion.
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)
System.Management.Automation Namespace
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)
For example, suppose you have a type that has a parsing method that converts only a string to your type. If you want the ConvertTo method to use this converter with your class, you should use the TypeConverterAttribute with ConvertThroughString in your class. This would allow your type to convert integers, doubles, strings and other types.
Although it is possible to derive from this class, there is no established scenario for doing this and any attempt to do so might result in unexpected behavior.
System.Object
System.Management.Automation.PSTypeConverter
System.Management.Automation.ConvertThroughString
System.Management.Automation.PSTypeConverter
System.Management.Automation.ConvertThroughString
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
Windows Developer Preview, Windows Server Developer PreviewReference
ConvertThroughString MembersSystem.Management.Automation Namespace
Other Resources
Windows PowerShell SDKSend comments about this topic to Microsoft.