CompObj Function | |
-- todo --
Compares the properties of two objects and returns True (.T.) if their properties and property values are identical.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax FUNCTION CompObj(
oExpression1,
oExpression2
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static Usual CompObj(
Usual oExpression1 = default,
Usual oExpression2 = default
)
Request Example
View SourceParameters
- oExpression1 (Optional)
- Type: Usual
Specifies the objects to compare. oExpression1 and oExpression2 can be any expressions that evaluate to objects,
such as object references, object variables, or object array elements.
- oExpression2 (Optional)
- Type: Usual
Specifies the objects to compare. oExpression1 and oExpression2 can be any expressions that evaluate to objects,
such as object references, object variables, or object array elements.
Return Value
Type:
Usual
Logical
Remarks
CompObj( ) returns False (.F.) if an object has a property that the other object doesn't have,
or if the objects have identical properties but the values of one or more properties differ.
Examples 1lstMyList1 = CreateOBJ('ListBox')
2lstMyList2 = CreateOBJ('ListBox')
3cmbMyCombo = CreateOBJ('ComboBox')
4lstMyList1.Name = 'list1'
5lstMyList2.Name = 'list2'
6Clear
7? lstMyList1.Name
8? lstMyList2.Name
9? CompObj(lstMyList1, cmbMyCombo)
10? CompObj(lstMyList1, lstMyList2)
11lstMyList2.Name = lstMyList1.Name
12? CompObj(lstMyList1, lstMyList2)
See Also