Customers cust=new Customers();
protected override int FindCore(PropertyDescriptor property, object key) { // Get the property info for the specified property. PropertyInfo propInfo = typeof(T).GetProperty(property.Name); T item; if (key != null) { // Loop through the items to see if the key // value matches the property value. for (int i = 0; i < Count; ++i) { item = (T)Items[i]; if (propInfo.GetValue(item, null).Equals(key)) return i; } } return -1; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)