vb.net - Using InLineAssignHelper in a ForEach to update two fields -
i have following code
de.tbl_summary.where(function(c) cbool(c.cpid = upn andalso _ c.c_year = cutoffdates.actualclaimyear andalso _ c.c_month >= cutoffdates.actualclaimmonth _ )).tolist().foreach(function(r) inlineassignhelper(r.teamid, utid)) which converted , adapted c# example. works fine need update 2 fields tried...
de.tbl_summary.where(function(c) cbool(c.cpid = upn andalso _ c.c_year = cutoffdates.actualclaimyear andalso _ c.c_month >= cutoffdates.actualclaimmonth _ )).tolist().foreach(function(r) inlineassignhelper(r.teamid, utid), _ inlineassignhelper(r.costcentre, ucostcentre)) this not work wavy line under second inlineassignhelper error
error bc30057 many arguments 'public overloads sub foreach(action action(of tbl_individualclaims))'. how can implement foreach update 2 fields in tblindividualclaims?
thanks
update
this vb converted code inlineassignhelper (converted c#)
private shared function inlineassignhelper(of t)(byref target t, byval value t) t target = value return value end function
if absolutely must keep same format, end so:
.foreach(function(r) inlineassignhelper(r.teamid, utid) inlineassignhelper(r.costcentre, ucostcentre) end function) p.s. makes more sense use sub in case
Comments
Post a Comment