I have an UnmanagedMemoryStream in below code, How can I get the object from deserilizing it. I was trying to get a Resource (rd.xaml) from an Assembly :
string address = @"WpfControlLibrary1.dll";
Assembly skinAssembly = Assembly.LoadFrom(address);
string name = skinAssembly.GetName().Name +".g";
var manager = new ResourceManager(name, skinAssembly);
ResourceSet rs = manager.GetResourceSet(CultureInfo.CurrentCulture, true, true);
UnmanagedMemoryStream stream = (UnmanagedMemoryStream)rs.GetObject("rd.baml", true);
I'm not able to deserialize the content of Stream into a .net Object(which is a Resource Dictionary in above case). How can I do this?
PS: BinaryFormatter is throwing an exception while Deserialize operation. 
 
    