Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 464
tags2k Avatar asked Jan 22 '23 06:01

tags2k


2 Answers

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!

like image 119
Mia Clarke Avatar answered Apr 30 '23 13:04

Mia Clarke


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

like image 23
David Pfeffer Avatar answered Apr 30 '23 13:04

David Pfeffer