Will a future version of .NET support tuples in C#?

前端 未结 12 1728
别那么骄傲
别那么骄傲 2020-11-28 23:54

.Net 3.5 doesn\'t support tuples. Too bad, But not sure whether the future version of .net will support tuples or not?

12条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 00:05

    There is a proper (not quick) C# Tuple implementation in Lokad Shared Libraries (Open-source, of course) that includes following required features:

    • 2-5 immutable tuple implementations
    • Proper DebuggerDisplayAttribute
    • Proper hashing and equality checks
    • Helpers for generating tuples from the provided parameters (generics are inferred by compiler) and extensions for collection-based operations.
    • production-tested.

提交回复
热议问题