There are a lot of benefits for using lambda expression to capture property or method of some class like the following code.
void CaptureProperty<T, TProperty> (Func<T, TProperty> exp)
{
// some logic to keep exp variable
}
// So you can use below code to call above method.
CaptureProperty<string, int>(x => x.Length);
However, the above code does not support static property. So, how to create method that support both static property and non-static property?
Thanks,