It seems that OptionalFieldAttribute is no longer required (if ever) to serialize with BinaryFormatter.
When using the example from codeguru, there is no longer any exception when creating code in Visual Studio 2010, even if it is intended for earlier versions of the .NET framework.
Another question about stackoverflow suggests that it has always been optional. It's true? And if so, is there really no way to get an exception for a missing field when serialized to binary content in .NET?
source share