C# Exists 사용 예제
Exists 기능은 찾고자 하는 항목이 존재하면 bool 값 (true, false)으로 반환을 해 줍니다.Exists를 이용한 예문을 하나 작성해 보겠습니다. private List L_consumer;if (this.L_consumer.Exists(item => item.name == "홍길동") == true){for (int i = 0; i < this.L_consumer.Count; ++i){if (this.L_consumer[i].name == "홍길동"){this.L_consumer.RemoveAt(i);break;}}}public class consumer{public string name { get; set; }public int privilege { get; set; }} 여기서 ite..