private string GetContentPropertyName (Type t) { object [] o = t.GetCustomAttributes (typeof (ContentPropertyAttribute), true); if (o.Length == 0) return null; ContentPropertyAttribute cpa = (ContentPropertyAttribute ) o [0]; return cpa.Name; } }