c# - An object reference is required for the non-static field, method, or property 'TableManager.UpdateSystemFields' -


i got following error while upgrading kentico 9.0.

error1:

for updatesystemfields there an object reference required non-static field, method, or property 'tablemanager.updatesystemfields'

error2:

as in kentico api reference 9.0 'updatetablebydefinition' funtion showing removed.

bool old = tablemanager.updatesystemfields;// getting error1 tablemanager.updatesystemfields = true;// getting error1 string schema = forminfo.getxmldefinition(); tablemanager tm = new tablemanager(null); tm.updatetablebydefinition(dci.classtablename, schema);// getting error2 tablemanager.updatesystemfields = old;// getting error1 

updatesystemfields not static member, can't access through type directly.

this not valid:

tablemanager.updatesystemfields 

this valid:

tablemanager tm = new tablemanager("connectionstring"); bool old = tm.updatesystemfields; 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -