Skip to content

C# 7.3: support == and != on tuple types  #3965

@BillWagner

Description

@BillWagner

Here's the spec: dotnet/csharplang#190

There are several things to discuss for this feature.

My notes here are based on an early draft of the spec. See the reference above for details.

  • We need to discuss how lifting works for tuples that have value types compared to tuples with nullable value types: (int, int) == (int?, int)
  • Lifting also applies to the tuple itself: (int, int) == (int, int)?
  • Conversion operators and deconstruction will not apply for type equality.
  • member names are not part of the equality comparison

This will update the references on tuples, but likely won't introduce new articles.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions