PSTypeConverter.CanConvertTo PSTypeConverter.CanConvertTo PSTypeConverter.CanConvertTo Method

Definition

Overloads

CanConvertTo(PSObject, Type) CanConvertTo(PSObject, Type) CanConvertTo(PSObject, Type)

Returns true if the converter can convert the sourceValue parameter to the destinationType parameter

CanConvertTo(Object, Type) CanConvertTo(Object, Type) CanConvertTo(Object, Type)

Returns true if the converter can convert the sourceValue parameter to the destinationType parameter

CanConvertTo(PSObject, Type) CanConvertTo(PSObject, Type) CanConvertTo(PSObject, Type)

Returns true if the converter can convert the sourceValue parameter to the destinationType parameter

public virtual bool CanConvertTo (System.Management.Automation.PSObject sourceValue, Type destinationType);
abstract member CanConvertTo : System.Management.Automation.PSObject * Type -> bool
override this.CanConvertTo : System.Management.Automation.PSObject * Type -> bool
Public Overridable Function CanConvertTo (sourceValue As PSObject, destinationType As Type) As Boolean
Parameters
sourceValue
PSObject PSObject PSObject

value supposedly from one of the types supported by this converter to be converted to the destinationType parameter

destinationType
Type Type Type

type to convert the sourceValue parameter, supposedly not one of the types supported by the converter

Returns

True if the converter can convert the sourceValue parameter to the destinationType parameter, otherwise false.

CanConvertTo(Object, Type) CanConvertTo(Object, Type) CanConvertTo(Object, Type)

Returns true if the converter can convert the sourceValue parameter to the destinationType parameter

public abstract bool CanConvertTo (object sourceValue, Type destinationType);
abstract member CanConvertTo : obj * Type -> bool
Public MustOverride Function CanConvertTo (sourceValue As Object, destinationType As Type) As Boolean
Parameters
sourceValue
Object Object Object

value supposedly from one of the types supported by this converter to be converted to the destinationType parameter

destinationType
Type Type Type

type to convert the sourceValue parameter, supposedly not one of the types supported by the converter

Returns

True if the converter can convert the sourceValue parameter to the destinationType parameter, otherwise false.

Applies to