T
Tony Johansson
Hello!
Below you can see two different ways to create a BinaryFormatter to use when
serialize object and collections.
I know that BinaryFormatter implement IFormatter that's why you can use
IFormatter in the way that is done here.
IFormatter serializer = new BinaryFormatter();
BinaryFormatter serializer = new BinaryFormatter();
Now to my question assume I'm only interested in method Serialize and
Deserialize which exist in IFormatter is it then
better to use IFormatter as compile type instead of BinaryFormatter.
So can I then say as a rule use the compile type that is most general and
can access the methods.
//Tony
Below you can see two different ways to create a BinaryFormatter to use when
serialize object and collections.
I know that BinaryFormatter implement IFormatter that's why you can use
IFormatter in the way that is done here.
IFormatter serializer = new BinaryFormatter();
BinaryFormatter serializer = new BinaryFormatter();
Now to my question assume I'm only interested in method Serialize and
Deserialize which exist in IFormatter is it then
better to use IFormatter as compile type instead of BinaryFormatter.
So can I then say as a rule use the compile type that is most general and
can access the methods.
//Tony