static string DumpAllProperties(object obj) { return string.Join(", ", TypeDescriptor.GetProperties(obj) .Cast() .Select(p => string.Format(CultureInfo.CurrentCulture, "{0} = {1}", p.Name, p.GetValue(obj)))); }
No comments:
Post a Comment