Replace Method (PSObjects)
Replaces an existing element with a new one.
'Declaration
Public Overridable Function Replace( _
ByVal As Object, _
ByVal As Object _
) As Integer
'Usage
Dim instance As PSObjects
Dim newObj As Object
Dim oldObj As Object
Dim value As Integer
value = instance.Replace(newObj, oldObj)
Parameters
- newObj
- New element to be used
- oldObj
- Element to be replaced
Return Value
New element if successful; otherwise, -1