Your edited code will not compile. You cannot use modellambda as a parameter because you have already declared it a local variable. It looks like you want to tell the compiler what the lambda parameter is Person, using the already declared local type of this type. But that will not work.
The proper way to inform a type compiler is to either declare it explicitly in lambda, as others said:
var b = CardView.Column((Person m) => m.Name);
or specify type arguments for the general method:
var b = CardView.Column<Person, string>(m => m.Name);
source
share