// this is to check to see if a key exists public bool CheckKey(string key) { // lets get our list dblLinked bucket = storage[getHash(key)]; // first lets see if there is any entry here if (!bucket.IsEmpty()) { // get the start of the list bucket.goToStart(); //check the first if ((string)((object[])bucket.getData())[0] == key) { return(true); } // then loop and check the rest while (bucket.isRight()) { if ((string)((object[])bucket.getData())[0] == key) { return(true); } bucket.goRight(); } } return(false); }
public void btnSaveRight_click(object sender, EventArgs e) { if (saveList.isRight()) { saveList.goRight(); lblSaveList.Text = saveList.ToString(); } else { DisplayAlert("", "end of list", "OK"); } }
public void btnLinkRight_click(object sender, EventArgs e) { // DisplayAlert("node found", nodeList.isRight().ToString(), "Okay"); if (nodeList.isRight()) { nodeList.goRight(); lblLink.Text = nodeList.getData().ToString(); } else { DisplayAlert("", "end of list", "OK"); } }