Yes, from the documentation, it shows that a class must be marked as [Serializable] in order to be serialized. Tested in code - I got an exception on .Serialize() when the data class was missing [Serializable]
Binary serialization in .NET Core
.NET Core supports binary serialization with a subset of types. You can see the list of supported types in the Serializable types section. The defined set of types are guaranteed to be serializable between .NET Framework 4.5.1 and later versions and .NET Core 2.0 and later versions. Other .NET implementations, such as Mono, aren't officially supported but should also be working.
I guess you cant binary serialize any class you want
upvoted 2 times
...
This section is not available anymore. Please use the main Exam Page.70-483 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
dosper
Highly Voted 5 years, 10 months agosscooter1010
5 years, 4 months agoIgris
Most Recent 5 years, 5 months ago