c# confused with lambda expression in set property -
this question has answer here:
- lambda getter , setter of property 3 answers
i've read code in setting property class below
private int id; public int id { get=>id; set=>id=value; }
and works. i'm totally confused lambda syntax.
i know lambda expression (input-parameters) => expression
. how drop brackets in left.
i've search answer in google not found. answer get&set should equal delegate, i've no idea this. has document this?
you find usage of lambda of c#
here
quoted here:
to create lambda expression, specify input parameters (if any) on left side of lambda operator =>, , put expression or statement block on other side.
note (if any)
Comments
Post a Comment