Faisal Ansari

Faisal Ansari

  • NA
  • 451
  • 833.8k

How to convert class object into Generic List

Mar 21 2011 8:27 AM
hi guys how r u all?
hope u all r fine.

please guide me about this. i m trying to implicitly cast class object into Generic list but i m unable to do this.

i was trying this code 

        Class1 c1 = (Class1)Session["user"];
        List<object> ol = ((List<object>)c1.ToString());

        foreach (object o in ol)
        {
            Response.Write(o + "<br>");
        }

please give me solution about this.. as soon as possible

Thanks.

Answers (2)