deserialization of the interface class with attachment of that Interface class dll

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Neo0143
    New Member
    • Apr 2016
    • 1

    deserialization of the interface class with attachment of that Interface class dll

    I stucked at this error...

    Code:
    //Code
     FileStream fs = new FileStream(
                   @"D:\Sagar Dot Net\Assign_2304_Interface_Person_Serialise\Assign_2304_Interface_Person_Serialise\Aadmai.txt",
                   FileMode.OpenOrCreate,
                   FileAccess.Read);
                BinaryFormatter bf = new BinaryFormatter();
                object obj = bf.Deserialize(fs);
                if (obj is Person)
                {
                    Person P = (Person)obj;
                    MessageBox.Show(P.GetDetails());
                }
    //Code
    
    //Error
    An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll
    
    Additional information: Unable to load type Assign_2304_Interface_Person_Serialise.Employee required for deserialization.
    //Error
    I serialize the Employee class with Person is an Interface HELP ME OUT...........
    Last edited by Rabbit; Apr 25 '16, 05:25 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • madankarmukta
    Contributor
    • Apr 2008
    • 308

    #2
    Could you please post your code for Employee code hr as it is giving error for ability to get serialize your employee instance.

    Comment

    Working...