Hi guys,
How are you doing?
Simple .net question: is it possible to convert a datarow to a IEnumerable?
Ty
Hi guys,
How are you doing?
Simple .net question: is it possible to convert a datarow to a IEnumerable?
Ty
@Elya
Yes buddy we can
if the datatable is stored in a variable named out_dt
out_dt.Rows.GetEnumerator
This gives you the System.Collections.IEnumerable…
Hope this would help you
Cheers…
I want to use it in my “For each activity” but it seem to be a IEnumerator instead of IEnumerable.
It seem I dont realy understand something xD
(the purpose is to check if i have empty element in my datarow. So i want to enumerate into it and check for each element of my datarow)
May be we can use this buddy
out_dt.Rows.OfType(of IEnumerable)
inside the for each actvity buddy
Cheers…!
I want to pass the specific row value in datatable as variable value like below
Can you please help me to convert it
For Each Row in Datatable (yourDT)
row(“ColumnSizes”).ItemArray.AsEnumerable.Cast(Of Integer)
The above query converts the row to an array of items which can be converted to an enumerable type. The cast function is used to convert to a particular type, in your case since you need IEnumerable cast is of integer