Where can I see what types BinaryFormatter can serialize?

For example, at the moment I need to figure out if it can serialize a LinkedList? This information not indicated on the official doc page (BinaryFormatter Класс (System.Runtime.Serialization.Formatters.Binary) | Microsoft Learn). I need a list of types that can be serialized.

Well, in principle the BinaryFormatter can serialize any type as long as it is marked as Serializable. I’ve never tried serializing a LinkedList, though it’s marked as Serializable and I’ve read that it should work in general. Though I’ve seen that the LinkedListNode class (used by the LinkedList internally) is not marked as serializable which could be an issue.

That said I’d like to add that the usage of a LinkedList is only recommended in very very specific cases. In most cases other classes like a normal List is better.

Apart from that you really should not use the BinaryFormatter for any kind of serialization. Even Microsoft itself does not recommend using it as the BinaryFormatter is a security nightmare. What’s your exact usecase of the BinaryFormatter and your LinkedList?