help with invalad cast exception

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

  1. doctruscott

    doctruscott New Member

    Jun 28, 2011
    Likes Received:
    Trophy Points:
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice