PSTypeConverter.CanConvertFrom PSTypeConverter.CanConvertFrom PSTypeConverter.CanConvertFrom Method

Definition

Overloads

CanConvertFrom(PSObject, Type) CanConvertFrom(PSObject, Type) CanConvertFrom(PSObject, Type)

Determines if the converter can convert the sourceValue parameter to the destinationType parameter.

CanConvertFrom(Object, Type) CanConvertFrom(Object, Type) CanConvertFrom(Object, Type)

Determines if the converter can convert the sourceValue parameter to the destinationType parameter.

CanConvertFrom(PSObject, Type) CanConvertFrom(PSObject, Type) 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);
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 PSObject PSObject

value supposedly not of the types supported by this converted to be converted to the destinationType parameter

destinationType
Type Type 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.

CanConvertFrom(Object, Type) CanConvertFrom(Object, Type) CanConvertFrom(Object, Type)

Determines if the converter can convert the sourceValue parameter to the destinationType parameter.

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 Object Object

value supposedly not of the types supported by this converted to be converted to the destinationType parameter

destinationType
Type Type 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