1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

help with invalad cast exception

Discussion in 'C#' started by doctruscott, Jun 28, 2011.

  1. doctruscott

    doctruscott New Member

    Joined:
    Jun 28, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    hello, i get a invalid cast exception for the following line : costList = (List<mycost>)abf.Deserialize(df);

    exact error is : Unable to cast object of type 'System.Collections.Generic.List`1[test.Form1+comoditys]' to type 'System.Collections.Generic.List`1[test.Form2+mycost]'.

    i have looked this up online and cannot find a good answer to this issue can anyone help me out?
     

Share This Page