c# - Why does this implementer method not see its sibling? -


i've got class implements interface:

public class sqlitehhsdbutils : ihhsdbutils {      void ihhsdbutils.setupdb()     {             . . .             if (!tableexists("appsettings"))      . . .      bool ihhsdbutils.tableexists(string tablename)     {     . . . 

it can't find own brother sitting right below (the if (!tableexists()):

the name 'tableexists' not exist in current context

how can / why not see it?

you have explicit interface implementation. can't access interface methods directly unless cast current instance interface type:

if (!((ihhsdbutils)this).tableexists("appsettings")) 

from 13.4.1 explicit interface member implementations

it not possible access explicit interface member implementation through qualified name in method invocation, property access, or indexer access. explicit interface member implementation can accessed through interface instance, , in case referenced member name.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -