/// <summary> /// Set or Add an item to the list /// </summary> private void setPropertyInfo(string aKey, PropertyItemType aValue) { VerifyType(aValue); if (Contains(aKey)) { this.Remove(aKey); } Add(aKey, aValue); }
public string Html() { string retVal = ""; for (Int32 i = 0; i < this.Count; i++) { PropertyItemType item = this[i]; retVal += " " + item.key + "=\"" + item.value + "\""; } return(retVal); }
/// <summary> /// Get an item from the list /// </summary> private PropertyItemType getPropertyInfo(string aKey) { if (Contains(aKey)) { foreach (DictionaryEntry de in this) { if ((string)de.Key == aKey) { return((PropertyItemType)de.Value); } } } PropertyItemType retVal = new PropertyItemType(aKey, ""); if (createIfNotExist) { Add(aKey, retVal); } return(retVal); }