import clr
import System
clr.AddReference('YourDLLAssemblyName')
from System.Runtime.Serialization.Formatters.Binary import BinaryFormatter
from System.IO import FileStream, FileMode, FileAccess, FileShare
filepath = '<PathToYourDataFile>'
serializer = BinaryFormatter()
reader = FileStream(filepath, FileMode.Open, FileAccess.Read, FileShare.None)
data = serializer.Deserialize(reader)
print((data, data.GetType()))
reader.Close()
Is there a way to read C# serialized objects into Python?