c# - Reference Private Property in Lambda expression? -
is possible reference private property in lambda expression? or public properties?
for example. private property named innercollection, line of code be:
x => x.innercollection
is there way achieve somehow - without using reflection etc.?
using .net 4.0.
thanks.
chris
unless lambda definition in method of class private field/property defined in, no there isn't. you'll have deal reflection then.
Comments
Post a Comment