migueldeicaza/MonoTouch.Dialog — pull request #88 by poke (2011-12-29 11:53:42+00:00)
Title: Skip compiler-generated fields.

Auto properties generate internal backing fields to store the actual value of the property. These backing fields are visible via reflection as private fields. As such, when reading properties in MT.D, you usually end up with both the properties and its internal backing fields (which have a generic name and cannot get any metadata via attributes).

As such it makes sense to skip all compiler-generated fields, i.e. backing fields. The attached commit simply does this by skipping the field if `CompilerGeneratedAttribute` was set for that field. `CompilerGeneratedAttribute` is automatically set by the compiler, and cannot be set by the user, so it is safe to never include those fields.