Why does .NET allow the SerializableAttribute to be applied to enumerations?

.NET knows how to automatically serialize all the simple built in types so that’s why you don’t need to specify it.

I think if .NET dissallowed the serializable attribute for items that are serializable it would be more confusing. The fact that you can decide to add it or leave it out is a matter of taste.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)