Consider the following code (C # 4.0):
public class Foo : LambdaExpression { }
This causes the following development-time error:
Foo does not implement inherited abstract member
System.Linq.Expressions.LambdaExpression.Accept(System.Linq.Expressions.Compiler.StackSpiller)
There is no problem with public class Foo : Expression { }, but out of curiosity and for the sake of training, I searched on Google System.Linq.Expressions.LambdaExpression.Accept(System.Linq.Expressions.Compiler.StackSpiller)and guessed that: zero results are returned (when was the last time you saw this?), Needless to say, I did not find any documentation on this method elsewhere.
As I said, you can easily inherit from Expression; on the other hand LambdaExpression, but not marked as sealed( Expression<TDelegate>inherited from it), seems to be intended to prevent inheritance from it. Is it really? Does anyone know what this method is?
EDIT (1): . Accept, (# 2010 Express) :
protected override Expression Accept(System.Linq.Expressions.ExpressionVisitor visitor)
{
return base.Accept(visitor);
}
- . StackSpiller, : System.Linq.Expressions.Compiler.StackSpiller is inaccessible due to its protection level.
EDIT (2): LambdaExpression , , , . , Foo cannot implement inherited abstract member System.Linq.Expressions.LambdaExpression.Accept(System.Linq.Expressions.Compiler.StackSpiller) because [reasons go here]; ( ), , , , Accept ( ).