Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Main()
- {
- IEnumerable<int> ints = new List<int>();
- IEnumerable<string> strings = new List<string>();
- var rez1=(IEnumerable<object>)ints; //compile error
- var rez2=(IEnumerable<object>)strings; //works
- var rez3=(List<object>)strings; //compile error
- }
Add Comment
Please, Sign In to add comment