I\'m trying to perform the following cast
private void MyMethod(object myObject) { if(myObject is IEnumerable) { List c
C# 4 will have covariant and contravariant template parameters, but until then you have to do something nongeneric like
IList collection = (IList)myObject;