Changeset 237 for Include/Classes/System/Object.ab
- Timestamp:
- May 7, 2007, 4:22:52 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Object.ab
r232 r237 10 10 ' 2つのオブジェクトが等しいかどうかを判断する 11 11 Virtual Function Equals( object As Object ) As Boolean 12 If This.GetHashCode() = object.GetHashCode() Then 12 If ObjPtr(This) = ObjPtr(object) Then 13 ' If This.GetHashCode() = object.GetHashCode() Then 13 14 Return True 14 15 Else … … 16 17 End If 17 18 End Function 19 18 20 Static Function Equals( objectA As Object, objectB As Object ) As Boolean 19 21 If ObjPtr(objectA) = NULL /*objectA = Nothing*/ Then 20 22 Return ObjPtr(objectB) = NULL 'objectB = Nothing 21 23 Else 22 Return objectA.Equals( objectB)24 Return objectA.Equals(objectB) 23 25 End If 24 26 End Function … … 35 37 ' ハッシュコードを取得する 36 38 Virtual Function GetHashCode() As Long 37 Return VarPtr( This ) As Long39 Return ObjPtr( This ) As Long 38 40 End Function 39 41
Note:
See TracChangeset
for help on using the changeset viewer.