hello everyone,
this is what i need to do and i am trying to figure out the way to do it. i have to iterate throughout the columns and if the columns contains “SI” value then i need to save in a variable the value corresponsing under the column “COD_IVA”
for example i need to know that the column TA_31 contains “SI” and then assign the value “0I” to another variable. can someone suggest a solution? thank u
how should i write it if the column name is dynamic? i mean, it is not always “TA31_IMP” but it should check all the other columns first. Because for example when it sees the column TA2_IMP it should see that there is “SI” and so save the value 12
You want to check all the columns ? or any specific columns?
if all use a for loop inside to loop thorough each column as well and in the value of for loop use Enumerable.Range(0,dt.Columns.Count).ToArray and change the type argument to integer
and inside that use the if condition Currentrow(Currentitem).ToString.Equals("SI") like this…
this way it will check all the columns and if found use break to move to next row