Link to home
Start Free TrialLog in
Avatar of Camillia
CamilliaFlag for United States of America

asked on

Why this line of code is not correct? difference between them?

I'm reviewing some interview questions. Why is the first one wrong and the second one correct?

            IEnumerable<string> objects1 = new List<object>(); //*** not correct

            IEnumerable<object> objects = new List<string>(); //correct
ASKER CERTIFIED SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial