In my C# unity5 code I got this
b.onClick.AddListener (() => {cb.CheckShouldExpand(b);});
my question is
why this part works "() => {cb.CheckShouldExpand(b);}"
but this "(cb, b) => cb.CheckShouldExpand(b);" OR "(b) => cb.CheckShouldExpand(b);" does not ?
because what I understand from the internet MSDN and dotnetperls.com says
() : input parameters
=> goesto
cb.CheckShouldExpand(b) : expression
which means from my understanding the expression part(Right) cb and b doesn't know what it is until you pass it in from the input parameters(Left).