Take the 2-minute tour ×

Does referencing a property through an expression like shown below, prevent the MonoTouch Linker from excluding that symbol (UILabel.Text ins this case)?

var label = new UILabel();
Expression<Func<string>> foo = () => label.Text;
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted


Unless you're using Reflection it is usually not possible to reference code and end up with the linker removing it.


Turns out LINQ expression might very well use reflection, so your code might not work. You can easily do a quick test and see what happens though.

share|improve this answer
This bug is related to this question: bugzilla.xamarin.com/show_bug.cgi?id=12126 so Rolf's comment is not to be taken lightly as I've learned the hard way :-) –  Oliver Weichhold May 7 at 7:15
add comment

Your Answer


