gpt4 book ai didi

.net - 什么是 ".Net Identity"?

转载 作者:行者123 更新时间:2023-12-02 04:08:25 25 4
gpt4 key购买 nike

我在一本书中看到过这样一句话:

"Default implementation of Equals(), defined by System.Object, which uses a comparison by .NET identity."



.Net Identity 是否意味着在内存中为引用类型和值类型分配的内存地址?

最佳答案

From MSDN:

The default implementation of Equals supports reference equality for reference types, and bitwise equality for value types. Reference equality means the object references that are compared refer to the same object. Bitwise equality means the objects that are compared have the same binary representation.



它回答了你的问题吗?

关于.net - 什么是 ".Net Identity"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6436747/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com