/// <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;
}