c# - Cannot apply indexing with [] to an expression of type 'ISet<string>' -


i getting error 'cannot apply indexing [] expression of type 'iset''

for code snippet

foreach (gridviewrow grv in customtabledatalist.unigrid.gridview.rows) {   if (grv != null)   {     if (null != grv.findcontrol(itemcheckboxid) && ((checkbox)grv.findcontrol(itemcheckboxid)).checked)     {       //at line getting error.       itemids += customtabledatalist.unigrid.actionsid[rowcounter] + ", ";       }     rowcounter++;   } } 

can give more details resolve this.

add new using:

system.linq; 

and change

foreach (gridviewrow grv in customtabledatalist.unigrid.gridview.rows) {   if (grv != null)   {     if (null != grv.findcontrol(itemcheckboxid) && ((checkbox)grv.findcontrol(itemcheckboxid)).checked)     {       itemids += customtabledatalist.unigrid.actionsid.toarray()[rowcounter] + ", ";     }     rowcounter++;   } } 

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 -