This newly added class provides an easy to use an extension method to return all of the properties in a class except the label.If you are unfamiliar with extension methods, these methods provide a very simple syntax to potentially provide complex actions on a single object, like in this case, where we take an arbitrary type and return all of the properties it contains (except for labelName):
using System; using System.Linq;
namespace chapter03.Common { public static class ExtensionMethods { public static string[] ToPropertyList<T>(this Type objType, string labelName) => objType.GetProperties().Where(a => a.Name != labelName).Select(a => a.Name).ToArray(); } }