public static bool IsSerializable(this Type type) { return ((type.Attributes & TypeAttributes.Serializable) == TypeAttributes.Serializable); }