public int Add(StringAttribute item) { return this.List.Add(item); }
public void Remove(StringAttribute item) { this.List.Remove(item); }
public string this[string name] { get { foreach (StringAttribute attr in this) { if (attr.Name == name) { return attr.Value; } } return null; } set { foreach (StringAttribute item in this) { if (item.Name == name) { if (value == null) this.List.Remove(item); else item.Value = value; return; } } if (value != null) { StringAttribute newItem = new StringAttribute(); newItem.Name = name; newItem.Value = value; this.List.Add(newItem); } } }