Create a gist now

Instantly share code, notes, and snippets.

anonymous /InvalidOperation.cs
Created Oct 20, 2011

List<Apple> apples = new List<Apple> { new Apple(), new Apple() };
List<Object> objects = apples;
objects[0] = "This is not an apple.";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment