public void AddAfter(int index, string wordValue) { //add given word after given index in the list. MemoryLocation newLoc = new MemoryLocation(); newLoc.Word(wordValue); this.AddAfter(index, newLoc); }
public void Bind(MemoryLocation memLoc) { //This is done because the = operator for setting can not be overloaded. this.NextLocation = memLoc.NextLocation; this.PreviousLocation = memLoc.PreviousLocation; this.ID = memLoc.ID; this.HasError = memLoc.HasError; this.Word(memLoc.Word()); }
public int Add(string wordValue) { //public wrappper for adding a word value MemoryLocation newLoc = new MemoryLocation(); int result; try { newLoc.Word(wordValue); result = 1; } catch { newLoc.Word("0000"); newLoc.HasError = true; result = -1; } this.Add(newLoc); return(result); }
private void addLocationToArrayList(MemoryLocation curLocation, ref ArrayList alLocations) { //add locations to array list given if (curLocation == null) { //do nothing } else { string s = ""; s += curLocation.Word().WordString; alLocations.Add(s); addLocationToArrayList(curLocation.NextLocation, ref alLocations); } }