Hi Team,
I Have an array
arryName={“balu”,“venki”,“pavan”,“hari”,“Yadav”}.some times values will not be same except “pavan”.
I want to “pavan” will get at first (0th index).
How can we do this? can someone help me on this.
Hi Team,
I Have an array
arryName={“balu”,“venki”,“pavan”,“hari”,“Yadav”}.some times values will not be same except “pavan”.
I want to “pavan” will get at first (0th index).
How can we do this? can someone help me on this.
@workhard86400
Welcome to the forum
we can manually reorder the array (take value, swap value, For each loop and bring value to first position…)
Or
order it with a custom sorting
arrNames.OrderByDescending(Function (x) Array.IndexOf(arrSorting, x)).ToArray
when pavan will not be present, the code will not fail