protected static PropertyInfo propertyKey(Type Type) { PropertyInfo[] properies = Type.GetProperties(); foreach (PropertyInfo property in properies) if (Attribute.IsDefined(property, typeof(PropertyKeyRecord))) return property; return null; }