Why is it illegal to have a private setter on an explicit getter-only interface implementation?

The only way to invoke an explicit interface member is to cast the object to the correct interface and then invoke the member on that interface. But once you’ve cast to IConnection, the IConnection.ConnectionString has no setter.

So there’s no way to invoke this private setter method.

Leave a Comment

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