Basic pattern matching in C# 6

Yota via Digitalmars-d digitalmars-d at puremagic.com
Fri Aug 15 09:45:23 PDT 2014


On Friday, 15 August 2014 at 12:01:59 UTC, Idan Arye wrote:
> Maybe if C#(and maybe also D?) had their own version of case 
> classes?

The proposal includes the following syntax for class declaration:

public record class Point(int x: X, int y: Y);

Which creates a class with a primary constructor, properties, 
operator is, Equals(), GetHashCode(), etc.


More information about the Digitalmars-d mailing list