1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
// CS0831: An expression tree may not contain a base access // Line: 20 using System; using System.Linq.Expressions; class B { protected B this [int i] { get { return null; } } } class C : B { public void Test () { Expression<Func<B>> e = () => base [8]; } }