If you want to ignore the write-only properties, you could include the check for getter in the loop statement:
csharp Code:
  1. PropertyInfo[] properties = type.GetProperties();
  2.  
  3. foreach (PropertyInfo property in properties.Where(pi => pi.GetMethod() != null))
By the way, note that I used "csharp" as the option for the HIGHLIGHT tag to get syntax-highlighting appropriate to C#.