Where is the implementation of InternalEquals(object objA, object objB)

后端 未结 2 1023
你的背包
你的背包 2020-12-06 13:50

While disassembling the .Net Source Code using Reflector, I came upon the Equals implementation in the Object Class and it refers to

bool InternalEquals(obj         


        
2条回答
  •  温柔的废话
    2020-12-06 14:44

    First, find in sscli20\clr\src\vm\ecall.cpp function mapping ("InternalEquals" -> ObjectNative::Equals):

    FCFuncStart(gObjectFuncs)
        FCIntrinsic("GetType", ObjectNative::GetClass, CORINFO_INTRINSIC_Object_GetType)
        FCFuncElement("InternalGetHashCode", ObjectNative::GetHashCode)
        FCFuncElement("InternalEquals", ObjectNative::Equals)
        FCFuncElement("MemberwiseClone", ObjectNative::Clone)
    FCFuncEnd()
    

    Next, find an implementation ObjectNative::Equals (published by Mehrdad Afshari)

提交回复
热议问题