d-edge / Cardidy

A .net library to identify credit card number and cvv
MIT License
33 stars 12 forks source link

refactor: use a tuple to initialize properties in the constructor #63

Closed aloisdg closed 2 years ago

aloisdg commented 2 years ago

That is just a syntactic sugar:

public Point(int x, int y, int z)
{
    X = x;
    Y = y;
    Z = z;
}

can be written as:

public Point(int x, int y, int z) => (X, Y, Z) = (x, y, z);

The compilation result are the same.

source:

aloisdg commented 2 years ago

A whole thread on /r/csharp about this PR