Why would adding a method add an ambiguous call, if it wouldn’t be involved in the ambiguity

Is this a bug? Yes. Congratulations, you have found a bug in overload resolution. The bug reproduces in C# 4 and 5; it does not reproduce in the “Roslyn” version of the semantic analyzer. I’ve informed the C# 5 test team, and hopefully we can get this investigated and resolved before the final release. (As … Read more

Why is a public const method not called when the non-const one is private?

When you call a.foo();, the compiler goes through overload resolution to find the best function to use. When it builds the overload set it finds void foo() const and void foo() Now, since a is not const, the non-const version is the best match, so the compiler picks void foo(). Then the access restrictions are … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)