System.Linq.Expressions.ExpressionVisitor is inaccessible due to its protection level

1.7k Views Asked by At

I'm trying to follow the instructions on Creating an IQueryable LINQ Provider, but when I implement the classes which inherit from ExpressionVisitor as instructed I am told that ExpressionVisitor is inaccessible due to its protection level. Am I missing something incredibly basic?

2

There are 2 best solutions below

7
On BEST ANSWER

The class is sealed, stupidly enough. Use the ExpressionVisitor at the end of this post instead. I can definitely recommend that walk-through, btw, it's really comprehensive and helpful in every way.

Good luck!

0
On

In .NET 4.0, the Microsoft-provided implementation of ExpressionVisitor (built into the BCL) is no longer sealed.