I need to get the first index value for abc which will be 0 and the last index will 2 same way for cde first will be 3 and the lat will be 5 .
Please suggest how to achieve this
There are many options to do it. Also it was not specified in which target form you need it
One of many options
Assign Activity:
dictLK = Dictionary (Of String, int32() ) =
(From d In dtData.AsEnumerable
Group d By k=d("Code").toString.Trim Into grp=Group
Let gi = grp.Select(Function (x) x.Table.Rows.IndexOf(x)).toArray
Select t=Tuple.Create(k,gi)).ToDictionary(Function (t) t.Item1,Function (t) t.Item2)
so you can access e.g. first code first index by
dictLK(“1”).First()
etc…