This is OK as long as you don't add elements through l.
The second case is equivalent to:
The problem in this case is that you don't know what type of elements are already in the object pointed to by the non-generic List reference l. You could have added something that is not a String prior to the assignment in line // 1, and the compiler is warning you about that possibility.
All code in my posts, unless a source is explicitly mentioned, is my own.
Joined: Sep 16, 2008
Thanks Ruben, I got it!
Joined: Dec 16, 2008
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com