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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -