ConvertThroughString Class

Enables a type that only has conversion from string to be converted from all other types through string.


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

'Usage
Dim instance As ConvertThroughString

public class ConvertThroughString : PSTypeConverter
public class ConvertThroughString extends PSTypeConverter
public class ConvertThroughString extends PSTypeConverter

It is permitted to subclass ConvertThroughString but there is no established scenario for doing this, nor has it been tested. 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

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