public bool Contains(List <FLibrary> listOfLibraries, FLibrary library) { for (int i = 0; i < listOfLibraries.Count; i++) { if (listOfLibraries[i].LName == library.LName) { return(true); } } return(false); }
public void ParseUsing() { lastIndex = parseLine.ToString().IndexOf(";"); FLibrary library = new FLibrary(); library.LId = inputSource.ElementID; library.LName = parseLine.ToString().Substring(startIndex + 6, lastIndex - (startIndex + 6)).Trim(); if (!library.Contains(listOfLibrary, library)) { listOfLibrary.Add(library); inputSource.ElementID++; } parseLine.Remove(0, lastIndex + 1); }