For the following Lambda expression:
GetPropertyNameAndArrayIndex(() => SomeArray[0])
I know that you can get the property name for an expression. I also know that you can get the array index by using a ConstantExpression and accessing the Right value. My question is how do you get array index (or Right value) when it is not a constant, I.E.,
for (int i = 0; i < 5; i++)
{
GetPropertyNameAndArrayIndex(() => SomeArray[i])
}
Any help would be greatly appreciated.