Changeset 212 for Include/Classes/System/Object.ab
- Timestamp:
- Apr 13, 2007, 5:12:31 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Object.ab
r207 r212 17 17 End Function 18 18 Static Function Equals( objectA As Object, objectB As Object ) As Boolean 19 Return objectA.Equals( objectB ) 19 If VarPtr(objectA) = 0 /*objectA = Nothing*/ Then 20 Return VarPtr(objectB) = 0 'objectB = Nothing 21 Else 22 Return objectA.Equals( objectB ) 23 End If 24 End Function 25 26 ' 参照先が等しいか判断する 27 Static Function ReferenceEquals(objectA As Object, objectB As Object) As Boolean 28 If VarPtr(objectA) = 0 /*objectA = Nothing*/ Then 29 Return VarPtr(objectB) = 0 'objectB = Nothing 30 ElseIf VarPtr(objectB) = 0 /*objectB = Nothing*/ Then 31 Return False 32 Else 33 Return GetPointer(VarPtr(objectA)) = GetPointer(VarPtr(objectA)) 34 End If 20 35 End Function 21 36
Note:
See TracChangeset
for help on using the changeset viewer.