PSTypeConverter.CanConvertFrom Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| CanConvertFrom(PSObject, Type) |
Determines if the converter can convert the |
| CanConvertFrom(Object, Type) |
Determines if the converter can convert the |
CanConvertFrom(PSObject, Type)
Determines if the converter can convert the sourceValue parameter to the destinationType parameter.
public:
virtual bool CanConvertFrom(System::Management::Automation::PSObject ^ sourceValue, Type ^ destinationType);
public virtual bool CanConvertFrom(System.Management.Automation.PSObject sourceValue, Type destinationType);
abstract member CanConvertFrom : System.Management.Automation.PSObject * Type -> bool
override this.CanConvertFrom : System.Management.Automation.PSObject * Type -> bool
Public Overridable Function CanConvertFrom (sourceValue As PSObject, destinationType As Type) As Boolean
Parameters
- sourceValue
- PSObject
Value supposedly not of the types supported by this converted to be converted to the destinationType parameter.
- destinationType
- Type
One of the types supported by this converter to which the sourceValue parameter should be converted.
Returns
True if the converter can convert the sourceValue parameter to the destinationType parameter, otherwise false.
Applies to
CanConvertFrom(Object, Type)
Determines if the converter can convert the sourceValue parameter to the destinationType parameter.
public:
abstract bool CanConvertFrom(System::Object ^ sourceValue, Type ^ destinationType);
public:
abstract bool CanConvertFrom(Platform::Object ^ sourceValue, Platform::Type ^ destinationType);
public abstract bool CanConvertFrom(object sourceValue, Type destinationType);
abstract member CanConvertFrom : obj * Type -> bool
Public MustOverride Function CanConvertFrom (sourceValue As Object, destinationType As Type) As Boolean
Parameters
- sourceValue
- Object
Value supposedly not of the types supported by this converted to be converted to the destinationType parameter.
- destinationType
- Type
One of the types supported by this converter to which the sourceValue parameter should be converted.
Returns
True if the converter can convert the sourceValue parameter to the destinationType parameter, otherwise false.