var index = list.IndexOf(9);
if (index == -1)
{
return; // or exception - whater, no element found.
}
int? nextItem = null; //null means that there is no next element.
if (index < list.Count - 1)
{
nextItem = list[index + 1];
}
int? prevItem = null;
if (index > 0)
{
prevItem = list[index - 1];
}