C# Question regarding rewriting from VB -
i'm vb guy learning c#. seem getting hang of i've got couple questions regarding code i'm writing.
in first 1 here i'm getting error when write code so:
irowindex = sf1411bindingsource.find(sf1411dataset.sf1411.columns(groupbox4.tag.tostring).tostring, textbox1.text); if (irowindex == -1)
error 1 'system.data.datatable.columns' 'property' used 'method' c:\11180_application\11180_application\edit.cs 186 71 11180_application
my other issue in vb use tags in c# doesnt seem them:
//set find label display new find column groupbox4.text = "find - " + sender.tag.tostring + ":"; //store sort column name in lblfind's tag property groupbox4.tag = sender.tag.tostring;
error 4 'object' not contain definition 'tag' c:\11180_application\11180_application\edit.cs 211 36 11180_application
any ideas here?
try columns[groupbox4.tag.tostring()]
first error.
regarding tags, in c# sender of type object, , doesn't have tag property. try casting control first:
((control)sender).tag
Comments
Post a Comment