I am trying to create a PredicateBuilder
class which wraps an Expression
and provides some methods to easily bu
This is not specific to extension methods. C# won't implicitly cast an object to another type unless there is a clue about the target type. Assume the following:
class A {
public static implicit operator B(A obj) { ... }
public static implicit operator C(A obj) { ... }
}
class B {
public void Foo() { ... }
}
class C {
public void Foo() { ... }
}
Which method would you expect to be called in the following statement?
new A().Foo(); // B.Foo? C.Foo?