I want to replace 4 with variable A = 4 type string.
My code as below.
Enumerable.Range(0,dt_configRate.RowCount).Select(Function(s) dt_configRate.Rows(s)(4).ToString).ToArray()
Please guide me about it.
I want to replace 4 with variable A = 4 type string.
My code as below.
Enumerable.Range(0,dt_configRate.RowCount).Select(Function(s) dt_configRate.Rows(s)(4).ToString).ToArray()
Please guide me about it.
Did you try to replace 4 with variable here ? If yes then may I know what error are you getting ?
Hi @fairymemay
As @lakshman Suggestion, If you face any error, share the screenshot and explain your query little bit
Try this expression
Enumerable.Range(0,dt_configRate.RowCount).Select(Function(s) dt_configRate.Rows(s)(Convert.ToInt64(ColumnNameorIndex)).ToString).ToArray()
Regards
Gokul
Hi @fairymemay ,
If you want to rely on the column name instead of the index, you can use this snippet of code for that:
dt_configRate.Columns("Sheet").Ordinal
Entire code →
Enumerable.Range(0,dt_configRate.RowCount).Select(Function(s) dt_configRate.Rows(s)(dt_configRate.Columns("Sheet").Ordinal).ToString).ToArray()
Kind Regards,
Ashwin A.K
Mention like this if the variable name is Strinput
Enumerable.Range(0,dt_configRate.RowCount).Select(Function(s) dt_configRate.Rows(s)(Convert.ToInt32(Strinput.ToString)).ToString).ToArray()
Cheers @fairymemay
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.