public string TestVerbDictionarywithNoun(Dictionary <string, string> verbDictionary, string TestVerbDictionarywithNoun, string noun) { if (verbDictionary.ContainsKey(noun)) { if (TestVerbDictionarywithNoun.Equals("take")) { //Examine items in inventory string itemDescription = verbDictionary[noun]; int lengthDescription = itemDescription.Length; itemDescription = itemDescription.Substring(itemDescription.IndexOf("the") + 4); string itemName = noun; itemDescription = itemName + " (" + itemDescription; inventoryDictionary.Add(itemName, itemDescription); } if (TestVerbDictionarywithNoun.Equals("examine")) { interactableItems.Examine(noun); } return(verbDictionary [noun]); } return("You can't " + TestVerbDictionarywithNoun + " \"" + noun + "\""); }