I have:
List A = new List(){1,2,3,4,5,6}; List m=new List(); for(int i=1;i
Ok so getting the Next item in the list you can use:
A.SkipWhile(x => x != value).Skip(1).FirstOrDefault();
So to get the previous item use:
var B = A.ToList(); B.Reverse(); B.SkipWhile(x => x != value).Skip(1).FirstOrDefault();