Re: Method chaining with generics



Raymond DeCampo wrote:

> Is there any case
> when casting a List to List<Object> would cause a problem?

I haven't been following the thread, so this may be irrelevant. But if you
start with a List that is intended to hold Strings (whether it's declared as a
List or a List<String> doesn't matter provided it reaches your code as a List)
and cast that to a List<Object>, then you'll be able to add a Rectangle to it,
which would not be correct.

-- chris



.



Relevant Pages

  • Re: Y&R Nelson Branco disses Y&R casting
    ... casting couch and that just didn't happen. ... Bitter, bitter, bitter. ... or self-respecting pro would agree that Amelia Heinle, and Chris Engen ... electric OLTL is right now, I _do_ understand that some energy is ...
    (rec.arts.tv.soaps.cbs)
  • Re: Y&R Nelson Branco disses Y&R casting
    ... casting couch and that just didn't happen. ... Bitter, bitter, bitter. ... or self-respecting pro would agree that Amelia Heinle, and Chris Engen ... When I see how electric OLTL is right now, I _do_ understand that some energy is missing from Y&R. ...
    (rec.arts.tv.soaps.cbs)
  • Re: Mosley voted worst Brition of the 20th Century
    ... >> ROTFLMAO! ... Suuuuure ... > You casting doubt Chris? ...
    (uk.politics.misc)
  • Re: object to a byte[]: revisit
    ... Casting to byte certainly wouldn't work. ... Jon Skeet - ... If replying to the group, please do not mail me too ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Mosley voted worst Brition of the 20th Century
    ... Suuuuure ... >> You casting doubt Chris? ... > not, of course, that I care what colour you are - it's your constant lying ...
    (uk.politics.misc)