public Add ( |
||
value |
/// The |
|
return | int |
public virtual int Add(FieldInfo value)
{
if (_data.IsUnique) CheckUnique(value);
int count = _data.Count;
if (count == _data.Items.Length)
_data.EnsureCapacity(count + 1);
_data.Items[count] = value;
return _data.Count++;
}
/// <summary> /// Gets all the fields WITHOUT ANY of the specified attributes. /// </summary> public static FieldInfoCollection GetFieldsWithOutAttributes(Type type, params Type[] types) { FieldInfoCollection fields = new FieldInfoCollection(); bool match; foreach (FieldInfo field in type.GetFields()) { match = true; foreach (Type attType in types) { if (field.GetCustomAttributes(attType, true).Length != 0) match = false; } if (match) fields.Add(field); } return fields; }