Skip to content

A sentence in Record types equality could be misleading #55309

Description

@Xulei-NL

Type of issue

Typo

Description

Dear author,

In this section, the final summary sentence is As the preceding example shows, for reference-type members their reference values are compared, not the referenced instances..

I feel the description could be incorrect or misleading. For instance, string is a reference type but the string comparison is based on referenced instances (string instance data) rather than reference values (memory address of string).

If you agree with me on this, we perhaps could change it to As the preceding example shows, the equality of reference-type members is compared using their specific equality implementations.

Looking forward to your feedback.

Best regards,

Xulei

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/equality-operators

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/operators/equality-operators.md

Document Version Independent Id

L2VuLXVzL2RvdG5ldC9jc2hhcnAvbGFuZ3VhZ2UtcmVmZXJlbmNlL29wZXJhdG9ycy9lcXVhbGl0eS1vcGVyYXRvcnM=

Platform Id

95ec09e1-56bb-1cc3-0775-c845eee6c72d

Article author

@pkulikov

Metadata

  • ID: L2VuLXVzL2RvdG5ldC9jc2hhcnAvbGFuZ3VhZ2UtcmVmZXJlbmNlL29wZXJhdG9ycy9lcXVhbGl0eS1vcGVyYXRvcnM=
  • PlatformId: 95ec09e1-56bb-1cc3-0775-c845eee6c72d
  • Service: dotnet-csharp
  • Sub-service: lang-reference

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions