public void BuildStageList(QuestStageDetailsViewModel stage) { if (stage == null) { return; } var item = Stages.FirstOrDefault(x => x.Stages.Contains(stage)); var index = Stages.IndexOf(item) + 1; var endIndex = Stages.Count - 1; for (int i = index; i <= endIndex; i++) { Stages.RemoveAt(index); } BuildStages(stage); }