I\'m using method overloading in Assembly A
:
public static int GetPersonId(EntityDataContext context, string name)
{
var id = from ... in co
The C# standard specifies that overload resolution (section 7.5.3) is performed by comparing each matching signature to determine which is a better fit. It doesn't say what happens when a reference is missing, so we must infer that it still needs to compare those unreferenced types.
In your case, the compiler needs a reference to EntityDataContext
to be able to compare the two overloads. Your call matches the signature exactly so in theory you shouldn't need this, but the standard doesn't specify any such short-circuit behavior.