public void AddRange(IEnumerable <T> collection) { foreach (T t in collection) { m_InternalList.Add(t); } }
public Program() { oc.Add(new MyStruct()); oc.CollectionChanged += CollectionChanged; bl.Add(new MyStruct()); bl.ListChanged += ListChanged; }
// Method GetTableList public static BindingList <TableItem> GetTableList(string dtb, string user) { BindingList <TableItem> bl = new System.ComponentModel.BindingList <TableItem>(); foreach (KeyValuePair <string, string> item in GetUsableCodeList(dtb, user, ref _dcLookup)) { TableItem ti = new TableItem(item.Key, item.Value); string lookup = ""; if (_dcLookup != null && _dcLookup.TryGetValue(item.Key, out lookup)) { ti.Lookup = lookup; } bl.Add(ti); } return(bl); }